# kaaasi/bomb-redone architecture

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

- Interactive diagram: https://gitdiagram.com/kaaasi/bomb-redone
- Repository: https://github.com/kaaasi/bomb-redone

## Overview

Bomb Redone is a C# port of the DOS Tank Wars game, currently described as an early scaffold. Its intended player workflow runs from the desktop window through menus and player setup into round/playfield interaction and results or shop screens. A separate bombtool workflow inspects original game data and renders or exports assets. The graph preserves these documented capabilities, but many runtime links are based on the README or the SOURCE INDEX; unsampled implementation details are not asserted.

Main entry points: [`src/BombRedone.Desktop/DesktopGame.cs`](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Desktop/DesktopGame.cs) (Desktop game), [`src/BombRedone.UI/Screens/MenuScreen.cs`](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.UI/Screens/MenuScreen.cs) (Menus and setup), [`src/BombRedone.Formats/GameData.cs`](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Formats/GameData.cs) (Game data reader), [`src/BombRedone.Core/Playfield/Playfield.cs`](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Core/Playfield/Playfield.cs) (Playfield rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Game runtime"]
  node_desktop["Desktop game<br/>[DesktopGame.cs]"]
  node_roundpreview["Round preview"]
end

subgraph group_gameplay["Rules and rounds"]
  node_roster["Player roster<br/>[PlayerRoster.cs]"]
  node_teams["Team setup<br/>[TeamPlay.cs]"]
  node_playfield["Playfield rules<br/>[Playfield.cs]"]
  node_shots["Ballistic shots<br/>[BallisticShot.cs]"]
  node_economy["Shop and accounts<br/>[Shop.cs]"]
end

subgraph group_presentation["UI and rendering"]
  node_screenhost["Screen host<br/>[ScreenHost.cs]"]
  node_menus["Menus and setup<br/>[MenuScreen.cs]"]
  node_playfieldui["Playfield screen<br/>[PlayfieldScreen.cs]"]
  node_results["Scores and results<br/>[ScoreResults.cs]"]
  node_surface["Indexed surface<br/>[Surface.cs]"]
  node_vgadraw["VGA drawing<br/>[VgaDraw.cs]"]
  node_text["Graph text<br/>[GraphText.cs]"]
end

subgraph group_formats["Game data"]
  node_gamedata["Game data reader<br/>[GameData.cs]"]
  node_config["Game configuration<br/>[GameConfig.cs]"]
  node_fonts["Bitmap fonts<br/>[BitmapFont.cs]"]
  node_palette["Palette format<br/>[Palette.cs]"]
end

subgraph group_tools["Asset tools"]
  node_toolcli["bombtool CLI<br/>[Program.cs]"]
  node_render["Render command<br/>[RenderCommand.cs]"]
  node_export["PNG export<br/>[ExportPng.cs]"]
end

node_player(("Player"))

node_player -->|"starts"| node_desktop
node_desktop -->|"hosts screens"| node_screenhost
node_desktop -->|"loads data"| node_gamedata
node_menus -->|"starts roster"| node_roster
node_menus -->|"starts team setup"| node_teams
node_desktop -->|"shows screens"| node_menus
node_desktop -.->|"runs round"| node_roundpreview
node_roundpreview -->|"draws through"| node_playfieldui
node_roundpreview -->|"builds round"| node_playfield
node_playfieldui -->|"draws field"| node_playfield
node_playfield -.->|"supports combat"| node_shots
node_desktop -.->|"uses shop"| node_economy
node_desktop -.->|"shows results"| node_results
node_playfieldui -->|"draws into"| node_surface
node_menus -->|"draws into"| node_surface
node_menus -->|"uses drawing"| node_vgadraw
node_text -->|"renders text"| node_surface
node_text -->|"uses fonts"| node_fonts
node_gamedata -.->|"reads config"| node_config
node_gamedata -.->|"reads palette"| node_palette
node_toolcli -->|"dispatches"| node_render
node_render -->|"renders field"| node_playfield
node_render -->|"exports image"| node_export
node_toolcli -->|"inspects data"| node_gamedata
node_export -->|"converts colors"| node_palette

click node_desktop "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Desktop/DesktopGame.cs"
click node_screenhost "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.UI/Screens/ScreenHost.cs"
click node_menus "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.UI/Screens/MenuScreen.cs"
click node_roster "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Core/Setup/PlayerRoster.cs"
click node_teams "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Core/Setup/TeamPlay.cs"
click node_roundpreview "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Desktop/RoundPreviewScreen.cs"
click node_playfieldui "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.UI/Screens/PlayfieldScreen.cs"
click node_playfield "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Core/Playfield/Playfield.cs"
click node_shots "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Core/Shot/BallisticShot.cs"
click node_economy "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Core/Economy/Shop.cs"
click node_results "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.UI/Screens/ScoreResults.cs"
click node_surface "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.UI/Surface.cs"
click node_vgadraw "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Core/Graphics/VgaDraw.cs"
click node_text "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.UI/Text/GraphText.cs"
click node_gamedata "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Formats/GameData.cs"
click node_config "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Formats/GameConfig.cs"
click node_fonts "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Formats/BitmapFont.cs"
click node_palette "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Formats/Palette.cs"
click node_toolcli "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Tools/Program.cs"
click node_render "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Tools/RenderCommand.cs"
click node_export "https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Tools/ExportPng.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_desktop,node_roundpreview toneBlue
class node_roster,node_teams,node_playfield,node_shots,node_economy toneAmber
class node_screenhost,node_menus,node_playfieldui,node_results,node_surface,node_vgadraw,node_text toneMint
class node_gamedata,node_config,node_fonts,node_palette toneRose
class node_toolcli,node_render,node_export,node_player toneIndigo
```

## Components

### Game runtime

- [Desktop game](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Desktop/DesktopGame.cs): `src/BombRedone.Desktop/DesktopGame.cs`
- [Round preview](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Desktop/RoundPreviewScreen.cs): `src/BombRedone.Desktop/RoundPreviewScreen.cs`

### Rules and rounds

- [Player roster](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Core/Setup/PlayerRoster.cs): `src/BombRedone.Core/Setup/PlayerRoster.cs`
- [Team setup](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Core/Setup/TeamPlay.cs): `src/BombRedone.Core/Setup/TeamPlay.cs`
- [Playfield rules](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Core/Playfield/Playfield.cs): `src/BombRedone.Core/Playfield/Playfield.cs`
- [Ballistic shots](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Core/Shot/BallisticShot.cs): `src/BombRedone.Core/Shot/BallisticShot.cs`
- [Shop and accounts](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Core/Economy/Shop.cs): `src/BombRedone.Core/Economy/Shop.cs`

### UI and rendering

- [Screen host](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.UI/Screens/ScreenHost.cs): `src/BombRedone.UI/Screens/ScreenHost.cs`
- [Menus and setup](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.UI/Screens/MenuScreen.cs): `src/BombRedone.UI/Screens/MenuScreen.cs`
- [Playfield screen](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.UI/Screens/PlayfieldScreen.cs): `src/BombRedone.UI/Screens/PlayfieldScreen.cs`
- [Scores and results](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.UI/Screens/ScoreResults.cs): `src/BombRedone.UI/Screens/ScoreResults.cs`
- [Indexed surface](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.UI/Surface.cs): `src/BombRedone.UI/Surface.cs`
- [VGA drawing](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Core/Graphics/VgaDraw.cs): `src/BombRedone.Core/Graphics/VgaDraw.cs`
- [Graph text](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.UI/Text/GraphText.cs): `src/BombRedone.UI/Text/GraphText.cs`

### Game data

- [Game data reader](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Formats/GameData.cs): `src/BombRedone.Formats/GameData.cs`
- [Game configuration](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Formats/GameConfig.cs): `src/BombRedone.Formats/GameConfig.cs`
- [Bitmap fonts](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Formats/BitmapFont.cs): `src/BombRedone.Formats/BitmapFont.cs`
- [Palette format](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Formats/Palette.cs): `src/BombRedone.Formats/Palette.cs`

### Asset tools

- [bombtool CLI](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Tools/Program.cs): `src/BombRedone.Tools/Program.cs`
- [Render command](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Tools/RenderCommand.cs): `src/BombRedone.Tools/RenderCommand.cs`
- [PNG export](https://github.com/kaaasi/bomb-redone/blob/main/src/BombRedone.Tools/ExportPng.cs): `src/BombRedone.Tools/ExportPng.cs`

### Other components

- **Player**

## Connections

- Player → Desktop game: starts
- Desktop game → Screen host: hosts screens (evidence: `src/BombRedone.Desktop/DesktopGame.cs`)
- Desktop game → Game data reader: loads data (evidence: `src/BombRedone.Desktop/DesktopGame.cs`)
- Menus and setup → Player roster: starts roster (evidence: `src/BombRedone.UI/Screens/PlayerSelectScreen.cs`)
- Menus and setup → Team setup: starts team setup (evidence: `src/BombRedone.UI/Screens/PlayerSelectScreen.cs`)
- Desktop game → Menus and setup: shows screens (evidence: `src/BombRedone.Desktop/DesktopGame.cs`)
- Desktop game → Round preview: runs round (evidence: `src/BombRedone.Desktop/DesktopGame.cs`)
- Round preview → Playfield screen: draws through (evidence: `src/BombRedone.Desktop/RoundPreviewScreen.cs`)
- Round preview → Playfield rules: builds round (evidence: `src/BombRedone.Desktop/RoundPreviewScreen.cs`)
- Playfield screen → Playfield rules: draws field (evidence: `src/BombRedone.UI/Screens/PlayfieldScreen.cs`)
- Playfield rules → Ballistic shots: supports combat (evidence: `src/BombRedone.Core/Shot/BallisticShot.cs`)
- Desktop game → Shop and accounts: uses shop
- Desktop game → Scores and results: shows results
- Playfield screen → Indexed surface: draws into (evidence: `src/BombRedone.UI/Screens/PlayfieldScreen.cs`)
- Menus and setup → Indexed surface: draws into (evidence: `src/BombRedone.UI/Screens/MenuScreen.cs`)
- Menus and setup → VGA drawing: uses drawing
- Graph text → Indexed surface: renders text (evidence: `src/BombRedone.UI/Text/GraphText.cs`)
- Graph text → Bitmap fonts: uses fonts (evidence: `src/BombRedone.UI/Text/GraphText.cs`)
- Game data reader → Game configuration: reads config
- Game data reader → Palette format: reads palette
- bombtool CLI → Render command: dispatches (evidence: `src/BombRedone.Tools/Program.cs`)
- Render command → Playfield rules: renders field (evidence: `src/BombRedone.Tools/RenderCommand.cs`)
- Render command → PNG export: exports image (evidence: `src/BombRedone.Tools/RenderCommand.cs`)
- bombtool CLI → Game data reader: inspects data (evidence: `src/BombRedone.Tools/Program.cs`)
- PNG export → Palette format: converts colors (evidence: `src/BombRedone.Tools/ExportPng.cs`)
