Debian Codegraph @

src/humanplayer.h

raw symbols SCIP
1 /***************************************************************************
2 * Copyright (C) 2004-2005 Artur Wiebe *
3 * [email protected] *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
20
21 #ifndef _HUMANPLAYER_H_
22 #define _HUMANPLAYER_H_
23
24 #include "player.h"
25
26 #include <qobject.h>
27
28
29 class myHumanPlayer : public myPlayer
30 {
31 Q_OBJECT
32
33 public:
34 // when playing player vs. player on same computer. the second
35 // player must invert some things.
36 myHumanPlayer(const QString& name, bool white, bool second_player);
37 ~myHumanPlayer();
38
39 virtual void yourTurn(const Checkers* game);
40 virtual bool fieldClicked(int fieldnumber, bool*, bool, QString& err_msg);
41 virtual void stop() {}
42
43 virtual bool isHuman() const { return true; }
44
45
46 public slots:
47 // virtual void getReady() { emit readyToPlay(); }
48
49 private:
50 bool go(int fieldnumber);
51
52 private:
53 bool m_second;
54
55 Checkers* m_game;
56 bool selected;
57
58 int from; // on Checkers board
59 int fromField; // on GUI board
60 };
61
62
63 #endif
64