# robjo82/sudokuproject architecture

> Architecture diagram of the GitHub repository robjo82/sudokuproject, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/robjo82/sudokuproject
- Repository: https://github.com/robjo82/sudokuproject

## Overview

This is a small, unfinished Sudoku game prototype with two separate playable implementations: a command-line game backed by preset grids, and a Pygame grid interface. The CLI workflow selects a stored puzzle, hides cells according to difficulty, accepts and checks moves, and ends when the grid is full. The README lists account, player-level, and richer UI features as requirements to implement; they are not evidenced in the sampled runtime. The graph reflects that distinction and omits unsupported links for the planned features.

Main entry points: [`main.py`](https://github.com/robjo82/sudokuproject/blob/master/main.py) (CLI game loop), [`grids.py`](https://github.com/robjo82/sudokuproject/blob/master/grids.py) (Grid lookup), [`testSalim.py`](https://github.com/robjo82/sudokuproject/blob/master/testSalim.py) (Pygame interface), [`copilotSudoku.py`](https://github.com/robjo82/sudokuproject/blob/master/copilotSudoku.py) (Solver routines)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI game"]
  node_cli_game["CLI game loop<br/>[main.py]"]
  node_puzzle_mask["Difficulty masking<br/>[main.py]"]
  node_move_input["Move input<br/>[main.py]"]
  node_move_check["Move validation<br/>[main.py]"]
  node_cli_display["Grid display<br/>[main.py]"]
  node_completion["Completion check<br/>[main.py]"]
end

subgraph group_puzzles["Puzzle data"]
  node_preset_grids[("Preset grids<br/>[grids.py]")]
  node_grid_lookup["Grid lookup<br/>[grids.py]"]
end

subgraph group_pygame["Pygame game"]
  node_pygame_game["Pygame interface<br/>[testSalim.py]"]
  node_solver["Solver routines<br/>[copilotSudoku.py]"]
end

subgraph group_planned["Planned features"]
  node_auth_plans["Account features<br/>[readme.txt]"]
  node_level_plans["Player level<br/>[readme.txt]"]
  node_visual_error_plans["Colored errors<br/>[readme.txt]"]
end

node_player(("Player"))

node_player -->|"plays"| node_cli_game
node_cli_game -->|"creates"| node_preset_grids
node_cli_game -->|"selects"| node_grid_lookup
node_grid_lookup -->|"reads"| node_preset_grids
node_cli_game -->|"calls"| node_puzzle_mask
node_cli_game -->|"prompts"| node_move_input
node_cli_game -->|"calls"| node_move_check
node_cli_game -->|"prints"| node_cli_display
node_cli_game -->|"checks"| node_completion
node_player -.->|"plays"| node_pygame_game
node_player -.->|"runs"| node_solver

click node_cli_game "https://github.com/robjo82/sudokuproject/blob/master/main.py"
click node_preset_grids "https://github.com/robjo82/sudokuproject/blob/master/grids.py"
click node_grid_lookup "https://github.com/robjo82/sudokuproject/blob/master/grids.py"
click node_puzzle_mask "https://github.com/robjo82/sudokuproject/blob/master/main.py"
click node_move_input "https://github.com/robjo82/sudokuproject/blob/master/main.py"
click node_move_check "https://github.com/robjo82/sudokuproject/blob/master/main.py"
click node_cli_display "https://github.com/robjo82/sudokuproject/blob/master/main.py"
click node_completion "https://github.com/robjo82/sudokuproject/blob/master/main.py"
click node_pygame_game "https://github.com/robjo82/sudokuproject/blob/master/testSalim.py"
click node_solver "https://github.com/robjo82/sudokuproject/blob/master/copilotSudoku.py"
click node_auth_plans "https://github.com/robjo82/sudokuproject/blob/master/readme.txt"
click node_level_plans "https://github.com/robjo82/sudokuproject/blob/master/readme.txt"
click node_visual_error_plans "https://github.com/robjo82/sudokuproject/blob/master/readme.txt"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli_game,node_puzzle_mask,node_move_input,node_move_check,node_cli_display,node_completion toneBlue
class node_preset_grids,node_grid_lookup toneAmber
class node_pygame_game,node_solver toneMint
class node_auth_plans,node_level_plans,node_visual_error_plans toneRose
class node_player toneIndigo
```

## Components

### CLI game

- [CLI game loop](https://github.com/robjo82/sudokuproject/blob/master/main.py): `main.py`
- [Difficulty masking](https://github.com/robjo82/sudokuproject/blob/master/main.py): `main.py`
- [Move input](https://github.com/robjo82/sudokuproject/blob/master/main.py): `main.py`
- [Move validation](https://github.com/robjo82/sudokuproject/blob/master/main.py): `main.py`
- [Grid display](https://github.com/robjo82/sudokuproject/blob/master/main.py): `main.py`
- [Completion check](https://github.com/robjo82/sudokuproject/blob/master/main.py): `main.py`

### Puzzle data

- [Preset grids](https://github.com/robjo82/sudokuproject/blob/master/grids.py): `grids.py`
- [Grid lookup](https://github.com/robjo82/sudokuproject/blob/master/grids.py): `grids.py`

### Pygame game

- [Pygame interface](https://github.com/robjo82/sudokuproject/blob/master/testSalim.py): `testSalim.py`
- [Solver routines](https://github.com/robjo82/sudokuproject/blob/master/copilotSudoku.py): `copilotSudoku.py`

### Planned features

- [Account features](https://github.com/robjo82/sudokuproject/blob/master/readme.txt): `readme.txt`
- [Player level](https://github.com/robjo82/sudokuproject/blob/master/readme.txt): `readme.txt`
- [Colored errors](https://github.com/robjo82/sudokuproject/blob/master/readme.txt): `readme.txt`

### Other components

- **Player**

## Connections

- Player → CLI game loop: plays (evidence: `main.py`)
- CLI game loop → Preset grids: creates (evidence: `main.py`)
- CLI game loop → Grid lookup: selects (evidence: `main.py`)
- Grid lookup → Preset grids: reads (evidence: `grids.py`)
- CLI game loop → Difficulty masking: calls (evidence: `main.py`)
- CLI game loop → Move input: prompts (evidence: `main.py`)
- CLI game loop → Move validation: calls (evidence: `main.py`)
- CLI game loop → Grid display: prints (evidence: `main.py`)
- CLI game loop → Completion check: checks (evidence: `main.py`)
- Player → Pygame interface: plays (evidence: `testSalim.py`)
- Player → Solver routines: runs (evidence: `copilotSudoku.py`)
