OOP A3 Board Games 35
a Board Game Project Made by Students at Cairo FCAI
Loading...
Searching...
No Matches
hide.h
Go to the documentation of this file.
1
9
10#ifndef HIDE_H
11#define HIDE_H
12
14#include <deque>
15#include <iostream>
16using namespace std;
17
28class hide_board : public Board<char> {
29private:
30 char blank_symbol = '.';
31 deque<pair<int, int>> history; // حفظ ترتيب الحركات (أقدم في front)
32 int visible_window = 6;
33public:
37 hide_board();
38
44 bool update_board(Move<char>* move);
45
51 bool is_win(Player<char>* player);
52
58 bool is_lose(Player<char>*) { return false; };
59
65 bool is_draw(Player<char>* player);
66
72 bool game_is_over(Player<char>* player);
73};
74
75
85class hide_ui : public UI<char> {
86public:
92 hide_ui();
93
97 ~hide_ui() {};
98
106 Player<char>* create_player(string& name, char symbol, PlayerType type);
107
113 virtual Move<char>* get_move(Player<char>* player);
114};
115
116#endif // XO_CLASSES_H
PlayerType
Represents the type of player in the game.
Definition BoardGame_Classes.h:24
Base template for any board used in board games.
Definition BoardGame_Classes.h:40
virtual bool is_lose(Player< T > *)=0
Check if a player has lost.
virtual bool is_draw(Player< T > *)=0
Check if the game ended in a draw.
virtual bool update_board(Move< T > *move)=0
Update the board with a new move.
virtual bool is_win(Player< T > *)=0
Check if a player has won.
virtual bool game_is_over(Player< T > *)=0
Check if the game is over.
Base class for handling user interface and input/output.
Definition BoardGame_Classes.h:166
virtual Move< T > * get_move(Player< T > *)=0
Ask the user (or AI) to make a move.
virtual Player< T > * create_player(string &name, T symbol, PlayerType type)=0
Create a player object based on input name, symbol, and type.