# fmoha24/assignment-2 architecture

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

- Interactive diagram: https://gitdiagram.com/fmoha24/assignment-2
- Repository: https://github.com/fmoha24/assignment-2

## Overview

This is a small command-line number-guessing game. The user enters guesses; the program validates integer input, compares valid guesses with the fixed secret number, gives feedback, and ends on a correct guess or after three valid attempts. The single source file contains both the interaction and game logic, so there are no separate runtime layers or subsystems. The graph reflects only the inspected implementation.

Main entry points: [`CST8116.java`](https://github.com/fmoha24/assignment-2/blob/main/CST8116.java) (Guessing loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Guessing game"]
  node_game_loop["Guessing loop<br/>[CST8116.java]"]
  node_terminal["Console input/output"]
end

node_player(("Player"))

node_player -->|"enters guesses"| node_game_loop
node_game_loop -->|"prompts and reads"| node_terminal
node_game_loop -->|"displays feedback"| node_player

click node_game_loop "https://github.com/fmoha24/assignment-2/blob/main/CST8116.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_game_loop,node_terminal toneBlue
class node_player toneIndigo
```

## Components

### Guessing game

- [Guessing loop](https://github.com/fmoha24/assignment-2/blob/main/CST8116.java): `CST8116.java`
- **Console input/output**

### Other components

- **Player**

## Connections

- Player → Guessing loop: enters guesses (evidence: `CST8116.java`)
- Guessing loop → Console input/output: prompts and reads (evidence: `CST8116.java`)
- Guessing loop → Player: displays feedback (evidence: `CST8116.java`)
