# drcnkrm-hue/cbl-project architecture

> Architecture diagram of the GitHub repository drcnkrm-hue/cbl-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/drcnkrm-hue/cbl-project
- Repository: https://github.com/drcnkrm-hue/cbl-project

## Overview

This repository contains a small Wordle implementation with Swing and terminal interfaces. The main workflow is to choose a secret word, accept a five-letter guess, check it against the word list, and show per-letter feedback and a win/loss result. The GUI implements its own game logic and word selection; the TUI has a separate, simpler one-guess flow. WordChecker is a standalone dictionary-API client, with no sampled evidence that either game interface uses it. Several other Java files are empty placeholders.

Main entry points: [`valid-wordle-words.txt`](https://github.com/drcnkrm-hue/cbl-project/blob/main/valid-wordle-words.txt) (Word list), [`GUI.java`](https://github.com/drcnkrm-hue/cbl-project/blob/main/GUI.java) (Swing interface), [`TUI.java`](https://github.com/drcnkrm-hue/cbl-project/blob/main/TUI.java) (Terminal interface), [`WordChecker.java`](https://github.com/drcnkrm-hue/cbl-project/blob/main/WordChecker.java) (Dictionary API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["Game interfaces"]
  node_swing["Swing interface<br/>[GUI.java]"]
  node_terminal["Terminal interface<br/>[TUI.java]"]
end

subgraph group_gameplay["Gameplay logic"]
  node_gui_round["GUI guess handling<br/>[GUI.java]"]
  node_gui_answer["GUI answer selection<br/>[GUI.java]"]
  node_terminal_game["Terminal game flow<br/>[TUI.java]"]
end

subgraph group_words["Word resources"]
  node_word_list[("Word list")]
  node_word_checker["Dictionary API client<br/>[WordChecker.java]"]
end

node_player(("Player"))
node_dictionary_api["Dictionary service"]

node_player -->|"plays via"| node_swing
node_player -->|"plays via"| node_terminal
node_swing -->|"submits guesses"| node_gui_round
node_gui_answer -->|"loads words"| node_word_list
node_gui_round -->|"checks guess"| node_word_list
node_terminal_game -->|"reads words"| node_word_list
node_terminal -->|"runs game"| node_terminal_game
node_word_checker -->|"checks word"| node_dictionary_api

click node_swing "https://github.com/drcnkrm-hue/cbl-project/blob/main/GUI.java"
click node_terminal "https://github.com/drcnkrm-hue/cbl-project/blob/main/TUI.java"
click node_gui_round "https://github.com/drcnkrm-hue/cbl-project/blob/main/GUI.java"
click node_gui_answer "https://github.com/drcnkrm-hue/cbl-project/blob/main/GUI.java"
click node_word_list "https://github.com/drcnkrm-hue/cbl-project/blob/main/valid-wordle-words.txt"
click node_terminal_game "https://github.com/drcnkrm-hue/cbl-project/blob/main/TUI.java"
click node_word_checker "https://github.com/drcnkrm-hue/cbl-project/blob/main/WordChecker.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_swing,node_terminal toneBlue
class node_gui_round,node_gui_answer,node_terminal_game toneAmber
class node_word_list,node_word_checker toneMint
class node_player,node_dictionary_api toneIndigo
```

## Components

### Game interfaces

- [Swing interface](https://github.com/drcnkrm-hue/cbl-project/blob/main/GUI.java): `GUI.java`
- [Terminal interface](https://github.com/drcnkrm-hue/cbl-project/blob/main/TUI.java): `TUI.java`

### Gameplay logic

- [GUI guess handling](https://github.com/drcnkrm-hue/cbl-project/blob/main/GUI.java): `GUI.java`
- [GUI answer selection](https://github.com/drcnkrm-hue/cbl-project/blob/main/GUI.java): `GUI.java`
- [Terminal game flow](https://github.com/drcnkrm-hue/cbl-project/blob/main/TUI.java): `TUI.java`

### Word resources

- [Word list](https://github.com/drcnkrm-hue/cbl-project/blob/main/valid-wordle-words.txt): `valid-wordle-words.txt`
- [Dictionary API client](https://github.com/drcnkrm-hue/cbl-project/blob/main/WordChecker.java): `WordChecker.java`

### Other components

- **Player**
- **Dictionary service**

## Connections

- Player → Swing interface: plays via (evidence: `GUI.java`)
- Player → Terminal interface: plays via (evidence: `TUI.java`)
- Swing interface → GUI guess handling: submits guesses (evidence: `GUI.java`)
- GUI answer selection → Word list: loads words (evidence: `GUI.java`)
- GUI guess handling → Word list: checks guess (evidence: `GUI.java`)
- Terminal game flow → Word list: reads words (evidence: `TUI.java`)
- Terminal interface → Terminal game flow: runs game (evidence: `TUI.java`)
- Dictionary API client → Dictionary service: checks word (evidence: `WordChecker.java`)
