Public Member Functions | Static Public Attributes

Board< dimensions > Class Template Reference

Generic board where the game takes place. More...

#include <Game/Boards/Board.hpp>

List of all members.

Public Member Functions

virtual const Pieceget (const int indexes[dimensions]) const =0
virtual int getDimensionLength (unsigned int dimensionIndex) const =0

Static Public Attributes

static const int DIMENSIONS = dimensions

Detailed Description

template<int dimensions>
class Board< 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()

See also:
Piece

Member Function Documentation

template<int dimensions>
virtual const Piece& Board< dimensions >::get ( const int  indexes[dimensions]  )  const [pure virtual]

Gets a piece from the board

Parameters:
indexes the indexes for each dimensions to locate the piece
Returns:
the Piece (can be an invalid piece if there is no Piece here)
See also:
Piece
template<int dimensions>
virtual int Board< dimensions >::getDimensionLength ( unsigned int  dimensionIndex  )  const [pure virtual]

Gets the size of a precise dimension

Parameters:
dimensionIndex index of the dimension requested
Returns:

Implemented in ChessBoard, and DameBoard.


Member Data Documentation

template<int dimensions>
const int Board< dimensions >::DIMENSIONS = dimensions [static]

Number of dimensions of the board (e.g.: 2 for 2D / 3 for 3D)


The documentation for this class was generated from the following file:
 All Classes Functions Variables