Generic board where the game takes place. More...
#include <Game/Boards/Board.hpp>
Public Member Functions | |
virtual const Piece & | get (const int indexes[dimensions]) const =0 |
virtual int | getDimensionLength (unsigned int dimensionIndex) const =0 |
Static Public Attributes | |
static const int | DIMENSIONS = dimensions |
Generic board where the game takes place.
This is the base class to declare a board. Technically, a board is just a place where the pieces are. So, the board is giving simple function (get()
) to get a piece to a precise location. Moreover, some information about the size of the board can be requested using getDimensionLength()
virtual int Board< dimensions >::getDimensionLength | ( | unsigned int | dimensionIndex | ) | const [pure virtual] |
Gets the size of a precise dimension
dimensionIndex | index of the dimension requested |
Implemented in ChessBoard, and DameBoard.
const int Board< dimensions >::DIMENSIONS = dimensions [static] |
Number of dimensions of the board (e.g.: 2 for 2D / 3 for 3D)