notation), while castling with the a-file rook is known as castling queenside or long castling (denoted 0-0-0). Status in games Check and checkmate A king that is under attack is said to be in check, and the player in check must immediately remedy the situation. There are three possible ways to remove the king from check: The king is moved to an adjacent non-threatened square. A king cannot castle to get out of check. A king can capture an adjacent enemy piece if that piece is not protected by another enemy piece. A piece is interposed between the king and the attacking piece to break the line of threat (not possible when the attacking piece is a knight or pawn, or when in double check). The attacking piece is captured (not possible when in double check, unless the king captures). If none of the three options are available, the player's king has been checkmated, and the player loses the game. At amateur levels, when placing the opponent's king in check, it is common to announce "check", but this is not required by the rules of chess. Stalemate A stalemate occurs when a player, on their turn, has no legal moves, and the player's king is not in check. If this happens, the king is said to have been stalemated, and the game ends in a draw. A player who has very little or no chance of winning will often, in order to avoid a loss, try to entice the opponent to inadvertently place the player's king in stalemate (see swindle). History The king's predecessor is the piece of the same name in shatranj. Like the modern king, it is the most important piece in the game and can move to any neighboring square. However, in shatranj, baring the king is a win unless the opponent can do the same immediately afterward; stalemating the king is a win; and castling does not exist. Role in gameplay In the opening and middlegame, the king will rarely play an active role in the development of an offensive or defensive position. Instead, a player will normally try to castle and seek safety on the edge of the board behind friendly pawns. In the endgame, however, the king emerges to play an active role as an offensive piece, and can assist in the promotion of the player's remaining pawns. It is not meaningful to assign