|
CBG
0.1
Compendium of board games
|
#include <Checkers.h>
Public Member Functions | |
| Checkers () | |
Public Member Functions inherited from GameWithXYSelector | |
| GameWithXYSelector (const int amountOfPlayers, const int columns, const int rows) | |
Public Member Functions inherited from Game | |
| Game (const int amountOfPlayers, const int columns, const int rows) | |
| virtual | ~Game () |
| virtual void | start () |
Private Member Functions | |
| bool | getMove () |
| int | validMove (Coordinate srcCoordinate, Coordinate destCoordinate) const |
| Validates moves. More... | |
| bool | executeMove (Square &srcSquare, Square &destSquare) |
| Moves the piece on source square to destination square. More... | |
| bool | executeMove (Square &srcSquare, Square &destSquare, Square &toJump) |
| int | isOver () |
| Checks if either of the players no longer have pieces. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from GameWithXYSelector | |
| void | drawScreen () const |
| Prints out the board and the players pieces. More... | |
| int | getPoint (string message, int range) const |
| Prompts with message to get a point between 0 and range. More... | |
| int | getOpposition () const |
| Returns the opposition. More... | |
Protected Attributes inherited from Game | |
| int | currentPlayer |
| Holds the position in the players array of the current player. More... | |
| Player ** | players |
| Holds all of the games players. More... | |
| Square ** | grid |
| Holds all of the squares that makes up the games grid. More... | |
| const int | amountOfPlayers |
| Holds the length of the players array. More... | |
| const int | columns |
| Holds the amount of columns within the grid. More... | |
| const int | rows |
| Holds the amount of rows within the grid. More... | |
| Checkers::Checkers | ( | ) |
Moves the piece on source square to destination square.
Moves the piece on source square to destination square and deletes the piece on the to jump square.
|
privatevirtual |
Calls getPoint twice to get a source square and destination square Validates the move and passes the source square and destination square onto executeMove().
Implements Game.
|
privatevirtual |
Checks if either of the players no longer have pieces.
Checks if either of the players no longer have pieces or a player cannot move.
Implements Game.
|
private |
Validates moves.