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

Loading...
Searching...
No Matches
inverse.h
Go to the documentation of this file.
1/***
2 /* @file XO_Classes.h
3 /* @brief Defines the X-O (Tic-Tac-Toe) specific classes that extend the generic board game framework.
4 /*
5 /* This file provides:
6 /* - `X_O_Board`: A specialized board class for the Tic-Tac-Toe game.
7 /* - `XO_UI`: A user interface class tailored to X-O game setup and player interaction.
8 /*/
9
10#ifndef INVERSE_H
11#define INVERSE_H
12
13#include "D:\Desktop\CU\CS213 OOP\A3 Games\Project35\BoardGame_Classes.h"
14 using namespace std;
15
26 class inverse_board : public Board<char> {
27 private:
28 char blank_symbol = '.';
29
30 public:
34 inverse_board();
35
41 bool update_board(Move<char>* move);
42
48 bool is_win(Player<char>* player) { return false; };
49
55 bool is_lose(Player<char>*);
56
62 bool is_draw(Player<char>* player);
63
69 bool game_is_over(Player<char>* player);
70};
71
72
82 class inverse_ui : public UI<char> {
83 public:
89 inverse_ui();
90
94 ~inverse_ui() {};
95
103 Player<char>* create_player(string& name, char symbol, PlayerType type);
104
110 virtual Move<char>* get_move(Player<char>* player);
111};
112
113#endif // INVERSE_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.