|
| bool | are_adjacent (const square &a, const square &b) noexcept |
| | Are the squares adjacent (i.e.
|
| |
| bool | are_adjacent_for_knight (const square &a, const square &b) noexcept |
| | Are the squares adjacent for a knight.
|
| |
| bool | are_all_unique (std::vector< square > squares) |
| | Are all the squares unique?
|
| |
| bool | are_at_knights_jump_distance (const square &a, const square &b) noexcept |
| | Are the squares seperated by the jump of a knight?
|
| |
| bool | are_en_passant_capture_squares (const square &attacker_square, const square &target_square, const chess_color player_color) |
| | Are these possible en-passant capture squares?
|
| |
| bool | are_on_adjacent_diagonal (const square &a, const square &b) noexcept |
| | Are the squares adjacent on the same diagonal, e.g. d1 and e2.
|
| |
| bool | are_on_same_diagonal (const square &a, const square &b) noexcept |
| | Are the squares on the same diagonal, e.g. d1 and a4.
|
| |
| bool | are_on_same_file (const square &a, const square &b) noexcept |
| | Are the squares on the same file, e.g. e2 and e4.
|
| |
| bool | are_on_same_half_diagonal (const square &a, const square &b) noexcept |
| | Are the squares on the same half-diagonal, also 'the jump of a knight' e.g.
|
| |
| bool | are_on_same_rank (const square &a, const square &b) noexcept |
| | Are the squares on the same rank, e.g. a1 and a8.
|
| |
| std::vector< std::pair< int, int > > | collect_all_bishop_delta_pairs () noexcept |
| | Collect all the delta squares for a bishop.
|
| |
| std::vector< std::vector< square > > | collect_all_bishop_target_squares (const square &s) noexcept |
| | Collect all the possible target squares for a bishop in all directions.
|
| |
| std::vector< square > | collect_all_king_target_squares (const square &s) noexcept |
| | Collect all the possible target squares for a king.
|
| |
| std::vector< std::pair< int, int > > | collect_all_knight_delta_pairs () noexcept |
| | Collect all the delta squares for a knight.
|
| |
| std::vector< square > | collect_all_knight_target_squares (const square &s) noexcept |
| | Collect all the possible target squares for a knight.
|
| |
| std::vector< std::pair< int, int > > | collect_all_queen_delta_pairs () noexcept |
| | Collect all the delta squares for a queen.
|
| |
| std::vector< std::vector< square > > | collect_all_queen_target_squares (const square &s) noexcept |
| | Collect all the possible target squares for a queen in all directions.
|
| |
| std::vector< std::pair< int, int > > | collect_all_rook_delta_pairs () noexcept |
| | Collect all the delta squares for a rook.
|
| |
| std::vector< std::vector< square > > | collect_all_rook_target_squares (const square &s) noexcept |
| | Collect all the possible target squares for a rook in all directions.
|
| |
| std::vector< square > | concatenate (const std::vector< square > &a, const std::vector< square > &b) |
| | Concatenate the vectors.
|
| |
| square | create_random_square (std::default_random_engine &rng_engine) |
| | Create a random square.
|
| |
| std::vector< char > | get_all_files () noexcept |
| | Get all the files, i.e. 'a' to and including 'h'.
|
| |
| std::vector< int > | get_all_ranks () noexcept |
| | Get all the ranks, i.e. 1 to and including 8.
|
| |
| std::vector< int > | get_all_ranks_in_reversed_order () noexcept |
| | Get all the ranks in reversed order, i.e. 8 to and including 1.
|
| |
| square | get_behind (const square &pawn_square, const chess_color color) |
| | Get the square behind a pawn.
|
| |
| square | get_en_passant_capture_square (const square &attacker_square, const square &target_square) |
| | Get the square that may be captured by en-passant.
|
| |
| char | get_file (const square &s) noexcept |
| | Get the file of a square, e.g. 'd' from 'd4'.
|
| |
| square | get_initial_king_square (const chess_color player_color) noexcept |
| | Get the intial king square.
|
| |
| square | get_initial_rook_square (const chess_color player_color, const castling_type t) noexcept |
| | Get the default rook square, for a castling direction.
|
| |
| std::vector< square > | get_intermediate_squares (const square &from, const square &to) |
| | Get the intermediate squares, in an inclusive way: the first square will be 'from', to last square will be 'to'.
|
| |
| square | get_king_target_square (const chess_color player_color, const piece_action_type action) |
| | Get the king target square when castling.
|
| |
| int | get_rank (const square &s) noexcept |
| | Get the rank of a square, e.g. '3' from 'e3'.
|
| |
| square | get_rook_target_square (const chess_color player_color, const piece_action_type action) |
| | Get the rook target square when castling.
|
| |
| bool | is_occupied (const square &s, const std::vector< square > &occupied_squares) noexcept |
| | Is the square 's' occupied?
|
| |
| bool | is_valid_square_xy (const int x, const int y) noexcept |
| | Can the x and y be used to create a valid square?
|
| |
| bool | is_invalid_square_xy (const int x, const int y) noexcept |
| | Can the x and y not be used to create a valid square?
|
| |
| void | test_square () |
| | Test this class and its free functions.
|
| |
| chess_color | to_color (const square &s) noexcept |
| | What is the color of this square?
|
| |
| game_coordinate | to_coordinat (const square &s) noexcept |
| |
| game_coordinate | to_coordinat (const std::string ¬ation) noexcept |
| |
| game_rect | to_game_rect (const square &s) noexcept |
| | Convert a square to a rectangle For example, a1 == ((0,0)-(1,1)) (notation is top-left, then bottom-left) For example, b1 == ((0,1)-(1,2)) (notation is top-left, then bottom-left)
|
| |
| std::vector< square > | to_squares (std::vector< std::pair< int, int > > xys) |
| | Convert the pairs of x-y-coordinats to valid squares.
|
| |
| std::string | to_str (const square &s) noexcept |
| |
| std::string | to_str (const std::vector< square > &s) noexcept |
| |
| bool | operator== (const square &lhs, const square &rhs) noexcept |
| |
| bool | operator!= (const square &lhs, const square &rhs) noexcept |
| |
| bool | operator< (const square &lhs, const square &rhs) noexcept |
| |
| std::ostream & | operator<< (std::ostream &os, const square &s) noexcept |
| |
| std::ostream & | operator<< (std::ostream &os, const std::vector< square > &s) noexcept |
| |