# kurbz-codes/prototype-application-1st-java-game architecture

> Architecture diagram of the GitHub repository kurbz-codes/prototype-application-1st-java-game, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kurbz-codes/prototype-application-1st-java-game
- Repository: https://github.com/kurbz-codes/prototype-application-1st-java-game

## Overview

A small Java Swing noughts-and-crosses game. Main creates the game controller, which coordinates player turns, move validation, win/draw handling, and resets through the board UI. The board’s buttons dispatch moves and reset requests back to the controller. The source shows these runtime interactions; the README provides no further feature or architecture detail.

Main entry points: [`src/main/NoughtsAndCrosses.java`](https://github.com/kurbz-codes/prototype-application-1st-java-game/blob/main/src/main/NoughtsAndCrosses.java) (Game controller), [`src/main/Board.java`](https://github.com/kurbz-codes/prototype-application-1st-java-game/blob/main/src/main/Board.java) (Game board), [`src/main/Player.java`](https://github.com/kurbz-codes/prototype-application-1st-java-game/blob/main/src/main/Player.java) (Player state), [`src/main/Main.java`](https://github.com/kurbz-codes/prototype-application-1st-java-game/blob/main/src/main/Main.java) (Main)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_main["Main<br/>[Main.java]"]
end

subgraph group_game["Game logic"]
  node_controller["Game controller"]
  node_player["Player state<br/>[Player.java]"]
end

subgraph group_ui["Swing interface"]
  node_board["Game board<br/>[Board.java]"]
end

node_user(("Player"))

node_main -->|"creates"| node_controller
node_controller -->|"creates"| node_board
node_controller -->|"creates"| node_player
node_user -->|"clicks cells"| node_board
node_board -->|"dispatches moves"| node_controller
node_board -->|"dispatches reset"| node_controller
node_controller -->|"checks and updates"| node_board
node_controller -->|"reads symbols"| node_player

click node_main "https://github.com/kurbz-codes/prototype-application-1st-java-game/blob/main/src/main/Main.java"
click node_controller "https://github.com/kurbz-codes/prototype-application-1st-java-game/blob/main/src/main/NoughtsAndCrosses.java"
click node_player "https://github.com/kurbz-codes/prototype-application-1st-java-game/blob/main/src/main/Player.java"
click node_board "https://github.com/kurbz-codes/prototype-application-1st-java-game/blob/main/src/main/Board.java"

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_main toneBlue
class node_controller,node_player toneAmber
class node_board toneMint
class node_user toneIndigo
```

## Components

### Application entry

- [Main](https://github.com/kurbz-codes/prototype-application-1st-java-game/blob/main/src/main/Main.java): `src/main/Main.java`

### Game logic

- [Game controller](https://github.com/kurbz-codes/prototype-application-1st-java-game/blob/main/src/main/NoughtsAndCrosses.java): `src/main/NoughtsAndCrosses.java`
- [Player state](https://github.com/kurbz-codes/prototype-application-1st-java-game/blob/main/src/main/Player.java): `src/main/Player.java`

### Swing interface

- [Game board](https://github.com/kurbz-codes/prototype-application-1st-java-game/blob/main/src/main/Board.java): `src/main/Board.java`

### Other components

- **Player**

## Connections

- Main → Game controller: creates (evidence: `src/main/Main.java`)
- Game controller → Game board: creates (evidence: `src/main/NoughtsAndCrosses.java`)
- Game controller → Player state: creates (evidence: `src/main/NoughtsAndCrosses.java`)
- Player → Game board: clicks cells (evidence: `src/main/Board.java`)
- Game board → Game controller: dispatches moves (evidence: `src/main/Board.java`)
- Game board → Game controller: dispatches reset (evidence: `src/main/Board.java`)
- Game controller → Game board: checks and updates (evidence: `src/main/NoughtsAndCrosses.java`)
- Game controller → Player state: reads symbols (evidence: `src/main/NoughtsAndCrosses.java`)
