![]() |
ChessPlusPlus
WIP
cplusplus.com Community Project
|
Holds the valid movements for all pieces on the board. More...
#include <Board.hpp>
Public Member Functions | |
| Movements_t::const_iterator | begin () const |
| Get the beginning iterator of the valid movements. More... | |
| Movements_t::const_iterator | end () const |
| Get the end iterator of the valid movements. More... | |
| void | add (piece::Piece const &p, Position_t const &tile) |
| Adds a valid movement. More... | |
| void | remove (piece::Piece const &p, Position_t const &tile) |
| Removes a valid movement. More... | |
Friends | |
| class | ::chesspp::board::Board |
Holds the valid movements for all pieces on the board.
There are three different kinds of movements:
This class provides a consistent interface for all three types.
Can be iterated over with a range-based for-loop.
| void chesspp::board::Board::Movements::add | ( | piece::Piece const & | p, |
| Position_t const & | tile | ||
| ) |
Adds a valid movement.
|
inline |
Get the beginning iterator of the valid movements.
|
inline |
Get the end iterator of the valid movements.
| void chesspp::board::Board::Movements::remove | ( | piece::Piece const & | p, |
| Position_t const & | tile | ||
| ) |
Removes a valid movement.
|
friend |