| OOP A3 Board Games 35 a Board Game Project Made by Students at Cairo FCAI

Loading...
Searching...
No Matches
diamond.h
Go to the documentation of this file.
1
9
10#ifndef DIAMOND_H
11#define DIAMOND_H
12
13#include "D:\Desktop\CU\CS213 OOP\A3 Games\Project35\BoardGame_Classes.h"
14 using namespace std;
15
26 class diamond_board : public Board<char> {
27 private:
28 char blank_symbol = '.';
29 char blocked_symbol = '#';
30
31 public:
35 diamond_board();
36
42 bool update_board(Move<char>* move)override;
43
49 bool is_win(Player<char>* player)override;
50
56 bool is_lose(Player<char>*)override { return false; };
57
63 bool is_draw(Player<char>* player)override;
64
70 bool game_is_over(Player<char>* player)override;
71};
72
73
83 class diamond_ui : public UI<char> {
84 public:
90 diamond_ui();
91
95 ~diamond_ui() {};
96
104 Player<char>* create_player(string& name, char symbol, PlayerType type);
105
111 virtual Move<char>* get_move(Player<char>* player);
112};
113
114#endif // XO_CLASSES_H
BoardGame_Classes.h
PlayerType
PlayerType
Represents the type of player in the game.
Definition BoardGame_Classes.h:24
Board
Base template for any board used in board games.
Definition BoardGame_Classes.h:40
Board::is_lose
virtual bool is_lose(Player< T > *)=0
Check if a player has lost.
Board::is_draw
virtual bool is_draw(Player< T > *)=0
Check if the game ended in a draw.
Board::update_board
virtual bool update_board(Move< T > *move)=0
Update the board with a new move.
Board::is_win
virtual bool is_win(Player< T > *)=0
Check if a player has won.
Board::game_is_over
virtual bool game_is_over(Player< T > *)=0
Check if the game is over.
UI
Base class for handling user interface and input/output.
Definition BoardGame_Classes.h:166
UI::get_move
virtual Move< T > * get_move(Player< T > *)=0
Ask the user (or AI) to make a move.
UI::create_player
virtual Player< T > * create_player(string &name, T symbol, PlayerType type)=0
Create a player object based on input name, symbol, and type.