16 to_calculate->push_back(dest);
33 std::cout <<
"\u2659";
35 std::cout <<
"\u265F";
59 std::cout <<
"Piece info : white=" <<
white << std::endl;
60 std::cout <<
"Legal moves :" << std::endl;
61 for(
int i = 0; i <
legals.size(); i++){
62 std::cout <<
"x=" <<
legals[i].get_x() <<
" y=" <<
legals[i].get_y() << std::endl;
a class representing coordinates
int get_x()
a function to get the x-axis attribute
int get_y()
a function to get the y-axis attribute
void move(coordinates move_to)
change the coordinate values to move the associated piece
bool is_possible_attack(coordinates dest) override
verify if the dest position is a valid attack move. The pawn need a special overrided function.
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 pos...
void canonical_print_piece() override
print the piece to the standard output in canonical form
std::vector< coordinates > possible_legals
void print_piece() override
print the piece to the standard output
void move(coordinates dest, bool debug_info) override
called to move the pawn
std::vector< coordinates > get_legals() override
retrieve the piece's legal moves
std::vector< coordinates > legals
bool is_corresponding(coordinates start, coordinates end, coordinates movement)
verify if a movement is corresponding to a starting and ending coordinates