Design: Win Condition Checking System
Design focuses on the logic and architecture for checking win conditions in turn-based games. UI, networking, and player matchmaking are out of scope.
Functional Requirements
Non-Functional Requirements
Jump into concepts and practice - no test required
+---------------------+
| Move Processor |
+----------+----------+
|
v
+----------+----------+ +---------------------+
| Game State Manager |<---->| Configuration Loader |
+----------+----------+ +---------------------+
|
v
+----------+----------+
| Win Condition Evaluator |
+----------+----------+
|
v
+----------+----------+
| Result Notifier |
+---------------------+board?board = [["X", "O", "X"],
["O", "X", "O"],
["O", "X", "X"]]def check_column(board, col):
return board[0][col] == board[1][col] == board[2][col]