BlueBubble 1.0
A recommendation algorithm for movies based on a Netlfix database
|
the pawn piece class. More...
#include <pawn.h>
Public Member Functions | |
pawn (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 | |
void | move (coordinates dest, bool debug_info) override |
called to move the pawn | |
bool | is_possible_attack (coordinates dest) override |
verify if the dest position is a valid attack move. The pawn need a special overrided function. | |
std::vector< coordinates > | get_legals () override |
retrieve the piece's legal moves | |
![]() | |
piece (bool _white, coordinates _coord) | |
the constructor for the piece class | |
bool | is_possible (coordinates dest) |
verify if a move is within piece range | |
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 | |
Private Attributes | |
std::vector< coordinates > | possible_legals |
Additional Inherited Members | |
![]() | |
bool | white |
coordinates | coord |
std::vector< coordinates > | legals |
bool | has_moved |
piece_type | type |
|
inline |
Definition at line 14 of file pawn.h.
|
overridevirtual |
print the piece to the standard output in canonical form
Reimplemented from piece.
|
overridevirtual |
|
overridevirtual |
verify if the dest position is a valid attack move. The pawn need a special overrided function.
dest | destination coordinates |
Reimplemented from piece.
Definition at line 70 of file pawn.cc.
|
overridevirtual |
called to move the pawn
dest | the destination coordinates of the piece |
debug_info | print debug info to output when true |
Reimplemented from piece.
Definition at line 51 of file pawn.cc.
|
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 pawn.cc.
|
overridevirtual |
print the piece to the standard output
Reimplemented from piece.
|
private |