Building Block View
Level 1: White Box Overall System
The system is divided into three main layers, clearly separated by their responsibility and technology:
- Presentation Layer (Blue): Purely visual. It reacts to changes in the Store and triggers commands (like "Start Game").
- Reactive Bridge (Yellow): The single source of truth for the UI. It holds the "current state" of players and settings.
- Simulation Engine (Green): The math-heavy core. It runs at a fixed frequency and drives the logic.
- Game Entities (Purple): The "Actors" within the simulation. They hold the behavior for specific game elements.
Key Components
Game: The central controller for a match.GameMap: Handles the grid, tiles, and spatial partitioning for objects.Tank: The primary actor, composed of aWeaponand controlled by aPlayer(Human or Bot).Bot: AI logic for controlling tanks via theAutopilotstrategy.