OOP A3 Board Games 35
a Board Game Project Made by Students at Cairo FCAI
Loading...
Searching...
No Matches
Numerical_UI Class Reference

#include <Numerical_UI.h>

Inheritance diagram for Numerical_UI:
UI< int >

Public Member Functions

 Numerical_UI ()
void display_board_matrix (const vector< vector< int > > &b) const
Move< int > * get_move (Player< int > *p) override
 Ask the user (or AI) to make a move.
Player< int > * create_player (string &n, int symbol, PlayerType t) override
 Create a player object based on input name, symbol, and type.
Public Member Functions inherited from UI< int >
 UI (string message, int cell_display_width)
 Construct the UI and display a welcome message.
virtual ~UI ()
void display_message (string message)
 Display any message to the user.
virtual Player< int > ** setup_players ()
 Set up players for the game.
void display_board_matrix (const vector< vector< int > > &matrix) const
 Display the current board matrix in formatted form.

Additional Inherited Members

Protected Member Functions inherited from UI< int >
string get_player_name (string player_label)
 Ask the user for the player's name.
PlayerType get_player_type_choice (string player_label, const vector< string > &options)
 Ask the user to choose the player type from a list.
Protected Attributes inherited from UI< int >
int cell_width
 Width of each displayed board cell.

Constructor & Destructor Documentation

◆ Numerical_UI()

Numerical_UI::Numerical_UI ( )
inline

Member Function Documentation

◆ create_player()

Player< int > * Numerical_UI::create_player ( string & name,
int symbol,
PlayerType type )
inlineoverridevirtual

Create a player object based on input name, symbol, and type.

Implements UI< int >.

◆ display_board_matrix()

void Numerical_UI::display_board_matrix ( const vector< vector< int > > & b) const
inline

◆ get_move()

Move< int > * Numerical_UI::get_move ( Player< int > * )
inlineoverridevirtual

Ask the user (or AI) to make a move.

Implements UI< int >.


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