Bird
0
0

In a chess game implementation, which piece's movement history must be tracked to determine castling eligibility?

easy📝 Conceptual Q1 of 15
LLD - Design — Chess Game
In a chess game implementation, which piece's movement history must be tracked to determine castling eligibility?
AOnly the king
BBoth the king and the rook involved in castling
COnly the rook
DAny piece on the back rank
Step-by-Step Solution
Solution:
  1. Step 1: Understand castling rules

    Castling requires that neither the king nor the rook involved has moved previously.
  2. Step 2: Identify pieces to track

    Both the king and the specific rook must have no prior moves to allow castling.
  3. Final Answer:

    Both the king and the rook involved in castling -> Option B
  4. Quick Check:

    Tracking only one piece is insufficient for castling validation. [OK]
Quick Trick: Track both king and rook moves for castling [OK]
Common Mistakes:
  • Tracking only the king's movement
  • Ignoring rook movement history
  • Assuming any rook can castle regardless of movement

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes