Dots and Boxes is a turn-based grid game. Players draw one line at a time between adjacent dots. Completing the fourth side of a box claims that box, earns a point, and gives the same player another turn.
The starter project is deliberately split into separate modules for game flow, board state, and rule validation. Read the existing implementation carefully before changing it.
From this folder:
python main.py
Enter moves in the form:
H row column
or
V row column
Rows and columns start at zero.
Run several games and deliberately create situations where a move completes one or more boxes.
Compare the score and turn behaviour before and after box completion. Identify the incorrect behaviour, trace it through the board and game-state logic, and fix it without replacing the modular structure.
Your before-change video should capture the broken behaviour clearly.
Add a substantial gameplay feature that requires changes across more than one module.
The feature should make the game more complete rather than simply changing text or appearance. It should interact correctly with the existing board state and turn/score system.
Strengthen input and game-state handling.
The program should safely handle malformed commands, invalid coordinates, repeated lines, and moves made after the board is already complete. Invalid input must not corrupt the board or score.
Create or expand automated tests covering the important game rules.
Include tests for at least:
Document the changes you made and any design decisions that were important to the solution.
main.py.Submission is only the following three things: