#include <TicTacToe5x5.h>
|
| | TicTacToe5x5_Board () |
| 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.
|
| | 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.
|
|
| 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.
|
◆ TicTacToe5x5_Board()
| TicTacToe5x5_Board::TicTacToe5x5_Board |
( |
| ) |
|
|
inline |
◆ game_is_over()
| bool TicTacToe5x5_Board::game_is_over |
( |
Player< char > * | | ) |
|
|
inlineoverridevirtual |
◆ is_draw()
| bool TicTacToe5x5_Board::is_draw |
( |
Player< char > * | | ) |
|
|
inlineoverridevirtual |
◆ is_lose()
| bool TicTacToe5x5_Board::is_lose |
( |
Player< char > * | | ) |
|
|
inlineoverridevirtual |
◆ is_win()
| bool TicTacToe5x5_Board::is_win |
( |
Player< char > * | | ) |
|
|
inlineoverridevirtual |
◆ update_board()
| bool TicTacToe5x5_Board::update_board |
( |
Move< char > * | move | ) |
|
|
inlineoverridevirtual |
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: