Bird
Raised Fist0

A move validation function returns True for all moves, but the game state does not update correctly. What is the most likely error?

medium📝 Analysis Q6 of Q15
LLD - Design — Tic-Tac-Toe Game
A move validation function returns True for all moves, but the game state does not update correctly. What is the most likely error?
AThe database connection is slow
BThe UI is not refreshing after moves
CMove validation logic is missing checks for move legality
DLogging is disabled
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the symptom

    Validation returns True always, so invalid moves pass.
  2. Step 2: Identify cause of incorrect game state

    Allowing illegal moves causes inconsistent game state updates.
  3. Final Answer:

    Move validation logic is missing checks for move legality -> Option C
  4. Quick Check:

    Missing validation checks = incorrect state [OK]
Quick Trick: Always validate moves to keep game state correct [OK]
Common Mistakes:
MISTAKES
  • Blaming UI instead of validation
  • Ignoring validation logic errors
  • Assuming database affects validation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LLD Quizzes