Skip to content

Add Dots and Boxes Game in Python #62

@UrekMaz

Description

@UrekMaz

Overview:

This issue proposes creating a command-line (CLI) implementation of the classic Dots and Boxes game in Python.
The game will feature a grid of dots where two players take turns connecting adjacent dots with lines (horizontal or vertical). Completing a box awards the player one point and an extra turn. The game continues until all boxes are completed, and the player with the higher score wins.

✨ Key Features

Grid Setup:
The game initializes with a configurable grid (e.g., 3×3 or 4×4).

Turn-Based Gameplay:
Two players alternately draw lines between adjacent dots.

Box Completion & Scoring:
When a player completes a box, it is marked with their initial, and they earn a point and another move.

Display Updates:
The grid refreshes after each move, showing drawn lines and completed boxes.

Game End:
The game concludes once all boxes are filled, and final scores are displayed with a winner announcement.

Replay Option:
Players can choose to replay after finishing a match.

Deliverable

A single, runnable Python script named dots_and_boxes.py, which:

Runs entirely in the terminal (no GUI dependencies).

Is cleanly structured and commented for readability.

Accurately handles turn order, scoring, and win conditions.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions