relatório limpo. falta começar apresentação.
[xYpjg3TdSw.git] / Game.h
blob59a9d79cc09fd4e047249c23d220719301b51f31
1 #ifndef __IA_GAME_H__
2 #define __IA_GAME_H__
4 #include <cstdio>
6 class Board;
7 class MoveHistoryEntry;
8 class Enemy;
10 class Game
12 public:
13 Game();
14 ~Game();
15 void move(int fromX, int fromY, int toX, int toY);
16 bool think();
17 void fill_moves(int x, int y, bool *to);
18 bool can_move(int x, int y);
19 void fill_pieces(bool *isEmpty, char *piece);
20 void set_player(bool player);
21 void set_players(Enemy *a, Enemy *b);
22 bool can_undo() { return _current_move > 1; }
23 bool can_redo() { return _current_move <= _move_count; }
24 void undo();
25 void redo();
26 void reset();
27 void get_last_move(int& fromX, int &fromY, int& toX, int& toY);
28 void load(FILE *in);
29 void set(MoveHistoryEntry entry);
30 void set_computer_color(int computerColor) { _computer_color = computerColor; }
31 void set_minimax_depth(int minimaxDepth);
32 bool is_end();
33 bool get_winner() { return !_player; }
34 void print();
36 private:
37 Board *_board;
38 bool _player;
39 int _move_count, _current_move, _computer_color, _minimax_depth;
40 MoveHistoryEntry *_move_history;
41 FILE *_out;
42 Enemy *_enemy[2];
46 #endif