BlueBubble 1.0
A recommendation algorithm for movies based on a Netlfix database
|
the knight piece class. More...
#include <knight.h>
Public Member Functions | |
knight (bool _white, coordinates _coord) | |
void | needed_space (coordinates dest, std::vector< coordinates > *to_calculate) override |
calculate a list of empty space coordinates needed for the move to be legal, assuming the move is possible | |
void | print_piece () override |
print the piece to the standard output | |
void | canonical_print_piece () override |
print the piece to the standard output in canonical form | |
![]() | |
piece (bool _white, coordinates _coord) | |
the constructor for the piece class | |
bool | is_possible (coordinates dest) |
verify if a move is within piece range | |
virtual bool | is_possible_attack (coordinates dest) |
verify if a move is within piece attack range | |
virtual void | move (coordinates dest, bool debug_info) |
called to move the piece | |
coordinates | get_coord () |
retrieve the piece's coordinates | |
bool | get_color () |
retrieve the piece's color | |
bool | get_has_moved () |
retrieve if the piece has already moved during the game | |
piece_type | get_type () |
retrieve the piece's type | |
virtual std::vector< coordinates > | get_legals () |
retrieve the piece's legal moves | |
Additional Inherited Members | |
![]() | |
bool | white |
coordinates | coord |
std::vector< coordinates > | legals |
bool | has_moved |
piece_type | type |
|
inline |
Definition at line 11 of file knight.h.
|
overridevirtual |
|
overridevirtual |
calculate a list of empty space coordinates needed for the move to be legal, assuming the move is possible
dest | destination coordinates |
Reimplemented from piece.
Definition at line 11 of file knight.cc.
|
overridevirtual |
print the piece to the standard output
Reimplemented from piece.