![]() |
Conquer Chess
Chess and Starcraft combined
|
#include "piece_actions.h"#include <algorithm>#include <cassert>#include <iostream>#include <sstream>
Functions | |
| 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. | |
| std::vector< piece_action > | concatenate (const std::vector< piece_action > &lhs_actions, const std::vector< piece_action > &rhs_actions) |
| Concatenate vectors. | |
| 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. | |
| 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? | |
| void | test_piece_actions () |
| std::ostream & | operator<< (std::ostream &os, const std::vector< piece_action > &p) noexcept |
| 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.
| std::vector< piece_action > concatenate | ( | const std::vector< piece_action > & | lhs_actions, |
| const std::vector< piece_action > & | rhs_actions | ||
| ) |
Concatenate vectors.
|
noexcept |
Determine if an action is part of a collection of actions.
| 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?
|
noexcept |
| void test_piece_actions | ( | ) |