|
| bool | can_attack_on_empty_board (const chess_color color, const piece_type &type, const square &from, const square &to) |
| | Can a piece attack from 'from' to 'to'? This function assumes the board is empty.
|
| |
| bool | can_capture_on_empty_board (const chess_color color, const piece_type &p, const square &from, const square &to) |
| | Can a piece capture from 'from' to 'to'? This function assumes the board is empty.
|
| |
| bool | can_move_on_empty_board (const chess_color color, const piece_type &type, const square &from, const square &to) |
| | Can a piece move from 'from' to 'to'? This function assumes the board is empty.
|
| |
| bool | can_promote (const chess_color color, const piece_type &type, const square &s) noexcept |
| | Can this piece promote?
|
| |
| bool | can_promote (const piece &p) noexcept |
| | Can this piece promote?
|
| |
| void | clear_actions (piece &p) |
| | Clear all the actions.
|
| |
| int | count_piece_actions (const piece &p) |
| | Count the number of actions a piece has.
|
| |
| std::string | describe_actions (const piece &p) |
| | Describe the actions a piece have, e.g. 'idle', or 'moving to (3, 4)'.
|
| |
| double | get_f_health (const piece &p) noexcept |
| | Get the fraction of the health, where 1.0 denotes full health.
|
| |
| double | get_f_shield (const piece &p) noexcept |
| | Get the fraction of the shield, where 1.0 denotes full shields.
|
| |
| square | get_occupied_square (const piece &p) noexcept |
| | Get the square that this piece occupies now.
|
| |
| piece | get_test_white_king () noexcept |
| | Create a piece to be used in testing: a white king on e1.
|
| |
| piece | get_test_white_knight (const race r) noexcept |
| | Create a piece to be used in testing: a white knight on c3.
|
| |
| piece | get_test_white_pawn () noexcept |
| |
| bool | has_actions (const piece &p) noexcept |
| | Does the piece have actions to do?
|
| |
| bool | has_just_double_moved (const piece &p, const in_game_time &when) noexcept |
| | Has this piece (i.e.
|
| |
| bool | has_moved (const piece &p) noexcept |
| | Has this piece (attempted to) move?
|
| |
| bool | is_dead (const piece &p) noexcept |
| | Is the unit dead?
|
| |
| bool | is_enpassantable (const piece &p, const in_game_time &when) |
| | Can the unit be captured by en-passant?
|
| |
| bool | is_idle (const piece &p) noexcept |
| | Is the unit idle?
|
| |
| bool | is_on_starting_rank (const chess_color c, const square &q) noexcept |
| | Is this piece (a pawn) on the starting rank?
|
| |
| bool | is_pawn (const piece &p) noexcept |
| | Is the piece a pawn?
|
| |
| bool | is_selected (const piece &p) |
| | Determine from the action history if the piece is selected.
|
| |
| void | test_piece () |
| | Test this class and its free functions.
|
| |
| void | tick_attack (piece &p, const delta_t &dt, game &g) |
| | Process a tick, when the current action is an attack.
|
| |
| void | tick_attack_en_passant (piece &p, const delta_t &dt, game &g) |
| |
| void | tick_castle_kingside (piece &p, const delta_t &dt, game &g) |
| | Process a tick, when the current action is a castling to kingside.
|
| |
| void | tick_castle_queenside (piece &p, const delta_t &dt, game &g) |
| | Process a tick, when the current action is a castling to queenside.
|
| |
| void | tick_move (piece &p, const delta_t &dt, game &g) |
| | Process a tick, when the current action is a move.
|
| |
| char | to_fen_char (const piece &p) noexcept |
| | Convert the piece to a FEN character.
|
| |
| bool | operator== (const piece &lhs, const piece &rhs) noexcept |
| |
| bool | operator!= (const piece &lhs, const piece &rhs) noexcept |
| |
| std::ostream & | operator<< (std::ostream &os, const piece &p) noexcept |
| |