Complete the code to check if castling is allowed by verifying the king's and rook's {{BLANK_1}} status.
if not king.[1] and not rook.[1]: allow_castling = True
Castling is only allowed if neither the king nor the rook has moved before.
Complete the code to detect if en passant capture is possible by checking the opponent pawn's {{BLANK_1}} move.
if opponent_pawn.last_move == [1]: allow_en_passant = True
En passant is only possible if the opponent pawn just moved two squares forward in one move.
Fix the error in the castling validation by correctly checking if the squares between king and rook are {{BLANK_1}}.
for square in squares_between: if square.[1]: return False
Castling is not allowed if any square between the king and rook is occupied.
Fill both blanks to correctly update the board after an en passant move.
board.move_piece(pawn, [1]) board.remove_piece([2])
The pawn moves to the target square, and the captured pawn is removed from its square.
Fill all three blanks to implement castling: move the king, move the rook, and update their {{BLANK_1}}, {{BLANK_2}}, and {{BLANK_3}} status.
board.move_piece(king, [1]) board.move_piece(rook, [2]) king.[3] = True rook.[3] = True
Castling moves the king and rook to their target squares and marks both as having moved.