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

Loading...
Searching...
No Matches
InfinityTicTacToeBoard Class Reference

`#include <InfinityTicTacToe.h>`

Inheritance diagram for InfinityTicTacToeBoard:

## Public Member Functions
| InfinityTicTacToeBoard ()
bool | update_board (Move< char > *move) override
| Update the board with a new move.
bool | is_win (Player< char > *player) override
| Check if a player has won.
bool | is_lose (Player< char > *player) override
| Check if a player has lost.
bool | is_draw (Player< char > *player) override
| Check if the game ended in a draw.
bool | game_is_over (Player< char > *player) override
| Check if the game is over.
Public Member Functions inherited from Board< char >
| Board (int rows, int columns)
| Construct a board with given dimensions.
virtual | ~Board ()
| Virtual destructor. Frees allocated board memory.
vector< vector< char > > | get_board_matrix () const
| Return a copy of the current board as a 2D vector.
int | get_rows () const
| Get number of rows.
int | get_columns () const
| Get number of columns.

## Additional Inherited Members
Protected Attributes inherited from Board< char >
int | rows
| Number of rows.
int | columns
| Number of columns.
vector< vector< char > > | board
| 2D vector for the board
int | n_moves
| Number of moves made.

## Constructor & Destructor Documentation

## ◆ InfinityTicTacToeBoard()

InfinityTicTacToeBoard::InfinityTicTacToeBoard | ( |  | ) |
| inline

## Member Function Documentation

## ◆ game_is_over()

bool InfinityTicTacToeBoard::game_is_over | ( | Player< char > * |  | ) |
| inline override virtual

Check if the game is over.

Implements Board< char >.

## ◆ is_draw()

bool InfinityTicTacToeBoard::is_draw | ( | Player< char > * |  | ) |
| inline override virtual

Check if the game ended in a draw.

Implements Board< char >.

## ◆ is_lose()

bool InfinityTicTacToeBoard::is_lose | ( | Player< char > * |  | ) |
| inline override virtual

Check if a player has lost.

Implements Board< char >.

## ◆ is_win()

bool InfinityTicTacToeBoard::is_win | ( | Player< char > * |  | ) |
| inline override virtual

Check if a player has won.

Implements Board< char >.

## ◆ update_board()

bool InfinityTicTacToeBoard::update_board | ( | Move< char > * | move | ) |
| inline override virtual

Update the board with a new move.

Parameters

  move | The move object containing position and symbol.

Returns
  true if the move is valid and applied, false otherwise.

Implements Board< char >.

The documentation for this class was generated from the following file:

- InfinityTicTacToe.h