12std::vector<std::pair<square, chess_color>>
17 const std::vector<piece_action>& lhs_actions,
18 const std::vector<piece_action>& rhs_actions
22bool is_in(
const piece_action& action,
const std::vector<piece_action>& actions)
noexcept;
26 const std::vector<std::pair<square, chess_color>> attacked_squares,
31std::ostream&
operator<<(std::ostream& os,
const std::vector<piece_action>& p)
noexcept;
chess_color
A chess piece color.
Definition chess_color.h:10
An action to be done by a piece.
Definition piece_action.h:18
A chess square.
Definition square.h:58
void test_piece_actions()
Definition piece_actions.cpp:56
bool is_in(const piece_action &action, const std::vector< piece_action > &actions) noexcept
Determine if an action is part of a collection of actions.
Definition piece_actions.cpp:37
std::vector< piece_action > concatenate(const std::vector< piece_action > &lhs_actions, const std::vector< piece_action > &rhs_actions)
Concatenate vectors.
Definition piece_actions.cpp:22
std::ostream & operator<<(std::ostream &os, const std::vector< piece_action > &p) noexcept
Definition piece_actions.cpp:82
bool is_square_attacked_by(const std::vector< std::pair< square, chess_color > > attacked_squares, const square &s, const chess_color enemy_color)
Is the square attacked by a certain (enemy) color?
Definition piece_actions.cpp:42
std::vector< std::pair< square, chess_color > > collect_attacked_squares(const std::vector< piece_action > &actions)
Collect all the squares that are attacked by each color.
Definition piece_actions.cpp:9