# elarion12/battleship-game-on-stm32f429i-discovery architecture

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

- Interactive diagram: https://gitdiagram.com/elarion12/battleship-game-on-stm32f429i-discovery
- Repository: https://github.com/elarion12/battleship-game-on-stm32f429i-discovery

## Overview

This is an embedded Battleship game for the STM32F429I-DISC1: hardware initialization leads into application orchestration, game modes and turn logic, then display and persistent statistics. The README documents single-player AI, local two-player play, touchscreen input, LCD rendering, SDRAM, and Flash telemetry. The supplied file tree contains only README.md and LICENSE, with no source excerpts, so implementation paths are null and the relationships shown are limited to those explicitly documented in the README.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application"]
  node_main["Hardware setup"]
  node_app["Application control"]
end

subgraph group_gameplay["Gameplay"]
  node_driver["Game controller"]
  node_single["Single-player AI"]
  node_two["Two-player mode"]
  node_shared["Shared game state"]
end

subgraph group_display["Display and input"]
  node_gameui["Game rendering"]
  node_lcd["LCD drawing"]
  node_fonts["Pixel fonts"]
end

subgraph group_hardware["Hardware and persistence"]
  node_touch["Touch controller"]
  node_tft["TFT controller"]
  node_sdram[("External SDRAM")]
  node_stats[("Flash statistics")]
  node_trng["Hardware RNG"]
end

node_player(("Player"))

node_player -->|"starts game"| node_app
node_main -->|"initializes"| node_app
node_app -->|"orchestrates"| node_driver
node_driver -->|"runs mode"| node_single
node_driver -->|"runs mode"| node_two
node_single -->|"uses state"| node_shared
node_two -->|"uses state"| node_shared
node_single -->|"gets randomness"| node_trng
node_player -->|"provides input"| node_touch
node_gameui -->|"draws through"| node_lcd
node_lcd -->|"drives"| node_tft
node_lcd -->|"renders text"| node_fonts
node_gameui -->|"uses framebuffer"| node_sdram
node_driver -->|"requests rendering"| node_gameui
node_driver -->|"records telemetry"| node_stats

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_main,node_app toneBlue
class node_driver,node_single,node_two,node_shared toneAmber
class node_gameui,node_lcd,node_fonts toneMint
class node_touch,node_tft,node_sdram,node_stats,node_trng toneRose
class node_player toneIndigo
```

## Components

### Application

- **Hardware setup**
- **Application control**

### Gameplay

- **Game controller**
- **Single-player AI**
- **Two-player mode**
- **Shared game state**

### Display and input

- **Game rendering**
- **LCD drawing**
- **Pixel fonts**

### Hardware and persistence

- **Touch controller**
- **TFT controller**
- **External SDRAM**
- **Flash statistics**
- **Hardware RNG**

### Other components

- **Player**

## Connections

- Player → Application control: starts game (evidence: `README.md`)
- Hardware setup → Application control: initializes (evidence: `README.md`)
- Application control → Game controller: orchestrates (evidence: `README.md`)
- Game controller → Single-player AI: runs mode (evidence: `README.md`)
- Game controller → Two-player mode: runs mode (evidence: `README.md`)
- Single-player AI → Shared game state: uses state (evidence: `README.md`)
- Two-player mode → Shared game state: uses state (evidence: `README.md`)
- Single-player AI → Hardware RNG: gets randomness (evidence: `README.md`)
- Player → Touch controller: provides input (evidence: `README.md`)
- Game rendering → LCD drawing: draws through (evidence: `README.md`)
- LCD drawing → TFT controller: drives (evidence: `README.md`)
- LCD drawing → Pixel fonts: renders text (evidence: `README.md`)
- Game rendering → External SDRAM: uses framebuffer (evidence: `README.md`)
- Game controller → Game rendering: requests rendering (evidence: `README.md`)
- Game controller → Flash statistics: records telemetry (evidence: `README.md`)
