# dwatkin-dev/csharpplayersguide architecture

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

- Interactive diagram: https://gitdiagram.com/dwatkin-dev/csharpplayersguide
- Repository: https://github.com/dwatkin-dev/csharpplayersguide

## Overview

This repository is a collection of four small C# console exercises, rather than one integrated product. Their workflows are a Minesweeper game, a target-range game, arrow construction and display, and armor damage reduction. The README only names the collection; the architecture below is based on the supplied project tree and sampled program sources.

Main entry points: [`Minesweeper/Program.cs`](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs) (Game Loop), [`TheUmbra/Program.cs`](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/TheUmbra/Program.cs) (Round Loop), [`Scratchpad/Program.cs`](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Scratchpad/Program.cs) (Arrow Demo), [`Armored/Program.cs`](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Armored/Program.cs) (Damage Demo)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_minesweeper["Minesweeper"]
  node_mine_program["Game Entry<br/>[Program.cs]"]
  node_board_generator["Fixed Board<br/>[Program.cs]"]
  node_board["Board State<br/>[Program.cs]"]
  node_cell["Cell State<br/>[Program.cs]"]
  node_game["Game Loop<br/>[Program.cs]"]
  node_input["Player Input<br/>[Program.cs]"]
  node_renderer["Console Renderer<br/>[Program.cs]"]
end

subgraph group_umbra["Umbra Game"]
  node_umbra_program["Round Loop<br/>[Program.cs]"]
  node_umbra_rules["Game Rules<br/>[Program.cs]"]
end

subgraph group_arrows["Arrow Exercise"]
  node_arrow_program["Arrow Demo<br/>[Program.cs]"]
  node_arrow["Arrow Model<br/>[Program.cs]"]
end

subgraph group_armor["Armor Exercise"]
  node_armor_program["Damage Demo<br/>[Program.cs]"]
  node_puppet["Puppet Health<br/>[Program.cs]"]
  node_armor_model["Armor Reduction<br/>[Program.cs]"]
end

node_player(("Player"))
node_console["Console I/O"]

node_player -->|"plays"| node_mine_program
node_mine_program -->|"generates board"| node_board_generator
node_board_generator -->|"creates"| node_board
node_mine_program -->|"starts"| node_game
node_game -->|"renders"| node_renderer
node_game -->|"requests move"| node_input
node_input -->|"reads keys"| node_console
node_player -->|"enters moves"| node_console
node_game -->|"uncovers cells"| node_board
node_board -->|"stores"| node_cell
node_renderer -->|"reads board"| node_board
node_renderer -->|"draws screen"| node_console
node_player -->|"plays"| node_umbra_program
node_umbra_program -->|"checks rules"| node_umbra_rules
node_umbra_program -->|"reads and prints"| node_console
node_player -->|"enters guess"| node_console
node_player -->|"runs demo"| node_arrow_program
node_arrow_program -->|"creates arrows"| node_arrow
node_arrow_program -->|"prints arrow data"| node_console
node_player -->|"runs demo"| node_armor_program
node_armor_program -->|"applies damage"| node_puppet
node_puppet -->|"reduces damage"| node_armor_model
node_armor_program -->|"prints health"| node_console

click node_mine_program "https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs"
click node_board_generator "https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs"
click node_board "https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs"
click node_cell "https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs"
click node_game "https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs"
click node_input "https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs"
click node_renderer "https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs"
click node_umbra_program "https://github.com/dwatkin-dev/csharpplayersguide/blob/master/TheUmbra/Program.cs"
click node_umbra_rules "https://github.com/dwatkin-dev/csharpplayersguide/blob/master/TheUmbra/Program.cs"
click node_arrow_program "https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Scratchpad/Program.cs"
click node_arrow "https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Scratchpad/Program.cs"
click node_armor_program "https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Armored/Program.cs"
click node_puppet "https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Armored/Program.cs"
click node_armor_model "https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Armored/Program.cs"

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_mine_program,node_board_generator,node_board,node_cell,node_game,node_input,node_renderer toneBlue
class node_umbra_program,node_umbra_rules toneAmber
class node_arrow_program,node_arrow toneMint
class node_armor_program,node_puppet,node_armor_model toneRose
class node_player,node_console toneIndigo
```

## Components

### Minesweeper

- [Game Entry](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs): `Minesweeper/Program.cs`
- [Fixed Board](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs): `Minesweeper/Program.cs`
- [Board State](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs): `Minesweeper/Program.cs`
- [Cell State](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs): `Minesweeper/Program.cs`
- [Game Loop](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs): `Minesweeper/Program.cs`
- [Player Input](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs): `Minesweeper/Program.cs`
- [Console Renderer](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Minesweeper/Program.cs): `Minesweeper/Program.cs`

### Umbra Game

- [Round Loop](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/TheUmbra/Program.cs): `TheUmbra/Program.cs`
- [Game Rules](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/TheUmbra/Program.cs): `TheUmbra/Program.cs`

### Arrow Exercise

- [Arrow Demo](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Scratchpad/Program.cs): `Scratchpad/Program.cs`
- [Arrow Model](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Scratchpad/Program.cs): `Scratchpad/Program.cs`

### Armor Exercise

- [Damage Demo](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Armored/Program.cs): `Armored/Program.cs`
- [Puppet Health](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Armored/Program.cs): `Armored/Program.cs`
- [Armor Reduction](https://github.com/dwatkin-dev/csharpplayersguide/blob/master/Armored/Program.cs): `Armored/Program.cs`

### Other components

- **Player**
- **Console I/O**

## Connections

- Player → Game Entry: plays
- Game Entry → Fixed Board: generates board
- Fixed Board → Board State: creates
- Game Entry → Game Loop: starts
- Game Loop → Console Renderer: renders
- Game Loop → Player Input: requests move
- Player Input → Console I/O: reads keys
- Player → Console I/O: enters moves
- Game Loop → Board State: uncovers cells
- Board State → Cell State: stores
- Console Renderer → Board State: reads board
- Console Renderer → Console I/O: draws screen
- Player → Round Loop: plays
- Round Loop → Game Rules: checks rules
- Round Loop → Console I/O: reads and prints
- Player → Console I/O: enters guess
- Player → Arrow Demo: runs demo
- Arrow Demo → Arrow Model: creates arrows
- Arrow Demo → Console I/O: prints arrow data
- Player → Damage Demo: runs demo
- Damage Demo → Puppet Health: applies damage
- Puppet Health → Armor Reduction: reduces damage
- Damage Demo → Console I/O: prints health
