[][src]Module shogai::invalidmoveerror

Check a move against a board, to ensure legality. Different functions are used to check differents types of incorrect moves.

Enums

InvalidMoveError

Functions

check_checkmate_by_pawn_drop

check whether the move respect the no checkmate by pawn drop rule

check_destination

check if destination is not occupied (or occupied by opponent)

check_in_board

Check if all the squares invloved fit into the shogiban

check_move_possible_after_drop

check if piece is dropped in a case where it will be allowed to move after

check_nifu

check if the nifu rule is respected

check_possible_move

check if the piece is allowed to move in such a way, according to its type/promotion

check_promotion

check if promotion (or absence of promotion) is allowed

check_start

check if there is indeed a piece at the given start location

check_syntax

check if move is syntaxically correct

check_uncover_check

allow to uncover check, else consider the move invalid if it uncovers a check and do not take the opponent king