Media Summary: Detect if either king is in danger from an opponent's piece. This is crucial to playing legal moves. It is also called a lot so it must be ... Determining if the King is safe in a given situation. If a move leads to one's own King in check, the move is illegal.
Java Chess Programming Video 12 - Detailed Analysis & Overview
Detect if either king is in danger from an opponent's piece. This is crucial to playing legal moves. It is also called a lot so it must be ... Determining if the King is safe in a given situation. If a move leads to one's own King in check, the move is illegal.