# plenavi/pendu architecture

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

- Interactive diagram: https://gitdiagram.com/plenavi/pendu
- Repository: https://github.com/plenavi/pendu

## Overview

Pendu is a Java command-line hangman game. Players use the menu to read rules, prepare a two-player or player-versus-computer game, and start rounds; the game chooses or accepts a word, accepts letter guesses, and tracks points. The single sampled source file contains the menu and gameplay logic, so these responsibilities share its path. It also reads difficulty-specific word lists, with a fallback described in the source. The excerpts are partial, so the graph shows only the supported file-read relationships.

Main entry points: [`iut/but1/pendu/Main.java`](https://github.com/plenavi/pendu/blob/main/iut/but1/pendu/Main.java) (Menu and gameplay), [`iut/but1/pendu/facile.txt`](https://github.com/plenavi/pendu/blob/main/iut/but1/pendu/facile.txt) (Easy words), [`iut/but1/pendu/moyen.txt`](https://github.com/plenavi/pendu/blob/main/iut/but1/pendu/moyen.txt) (Medium words), [`iut/but1/pendu/difficile.txt`](https://github.com/plenavi/pendu/blob/main/iut/but1/pendu/difficile.txt) (Hard words)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Game runtime"]
  node_game_logic["Menu and gameplay<br/>[Main.java]"]
end

subgraph group_words["Word lists"]
  node_easy_words["Easy words<br/>[facile.txt]"]
  node_medium_words["Medium words<br/>[moyen.txt]"]
  node_hard_words["Hard words<br/>[difficile.txt]"]
end

node_player(("Player"))

node_player -->|"chooses and guesses"| node_game_logic
node_game_logic -->|"prompts and reports"| node_player
node_game_logic -->|"reads by difficulty"| node_easy_words
node_game_logic -->|"reads by difficulty"| node_medium_words
node_game_logic -->|"reads by difficulty"| node_hard_words

click node_game_logic "https://github.com/plenavi/pendu/blob/main/iut/but1/pendu/Main.java"
click node_easy_words "https://github.com/plenavi/pendu/blob/main/iut/but1/pendu/facile.txt"
click node_medium_words "https://github.com/plenavi/pendu/blob/main/iut/but1/pendu/moyen.txt"
click node_hard_words "https://github.com/plenavi/pendu/blob/main/iut/but1/pendu/difficile.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_game_logic toneBlue
class node_easy_words,node_medium_words,node_hard_words toneAmber
class node_player toneIndigo
```

## Components

### Game runtime

- [Menu and gameplay](https://github.com/plenavi/pendu/blob/main/iut/but1/pendu/Main.java): `iut/but1/pendu/Main.java`

### Word lists

- [Easy words](https://github.com/plenavi/pendu/blob/main/iut/but1/pendu/facile.txt): `iut/but1/pendu/facile.txt`
- [Medium words](https://github.com/plenavi/pendu/blob/main/iut/but1/pendu/moyen.txt): `iut/but1/pendu/moyen.txt`
- [Hard words](https://github.com/plenavi/pendu/blob/main/iut/but1/pendu/difficile.txt): `iut/but1/pendu/difficile.txt`

### Other components

- **Player**

## Connections

- Player → Menu and gameplay: chooses and guesses (evidence: `iut/but1/pendu/Main.java`)
- Menu and gameplay → Player: prompts and reports (evidence: `iut/but1/pendu/Main.java`)
- Menu and gameplay → Easy words: reads by difficulty (evidence: `iut/but1/pendu/Main.java`)
- Menu and gameplay → Medium words: reads by difficulty (evidence: `iut/but1/pendu/Main.java`)
- Menu and gameplay → Hard words: reads by difficulty (evidence: `iut/but1/pendu/Main.java`)
