Game Overview
"State of War" is a turn-based strategy game where players command a military faction to defeat an opponent by destroying their base. The game features grid-based movement, unit management, and tactical combat.
Core Mechanics
-
Grid System:
- Map Size: 10x10 grid.
- Terrain: Plains (no effects), Forests (reduce movement by 1), Mountains (impassable).
- Visibility: Units reveal adjacent cells (8 directions).
-
Factions:
- Player: Starts at top-left corner (0,0).
- AI Opponent: Starts at bottom-right corner (9,9).
- Bases:
- Health: 1000 HP.
- Function: Produce units and generate resources.
- Destruction: Ends the game.
-
Units: | Unit | Cost | HP | Attack | Movement | Range | Special Ability | |------------|------|-----|--------|----------|-------|-----------------------| | Soldier| 10 | 100 | 15 | 2 | 1 | None | | Tank | 30 | 200 | 40 | 3 | 1 | Crushes Forests | | Artillery| 50 | 150 | 75 | 1 | 4 | Area damage (2x2) |
-
Resources:
- Starting: 100 resources.
- Income: +20 resources per turn (from base).
- Spending: Units cost resources to build.
-
Turn Structure:

- Phase 1: Build
Build units adjacent to your base (if resources allow).
- Phase 2: Move
Move units within movement range (pathfinding around obstacles).
- Phase 3: Attack
Units attack enemies within range (damage = attacker’s Attack stat).
- Phase 4: AI Turn
AI builds, moves, and attacks using simple pathfinding (A* algorithm).

- Phase 1: Build
Game Rules
-
Movement:
- Units move horizontally/vertically (no diagonal).
- Forests reduce movement by 1 (e.g., Tank moves 3 → 2 in Forest).
- Units cannot stack or occupy the same cell.
-
Combat:
- Damage is dealt instantly.
- Destroyed units are removed from the grid.
- Artillery deals damage in a 2x2 area.
-
Victory Conditions:
- Win: Destroy enemy base.
- Lose: Your base is destroyed or you surrender.
-
Terrain Effects:

- Forests: Hide units (only visible to adjacent enemies).
- Mountains: Block movement and line of sight.
AI Opponent Logic
- Build Priority: Tanks > Soldiers > Artillery (prioritizes strength).
- Movement: Pathfinding to player base (A* algorithm).
- Attack: Targets nearest enemy in range (prioritizes high-value units).
UI Elements
-
Grid Display:
- Symbols:
P(Player),E(Enemy),F(Forest),M(Mountain), (Empty). - Health bars for units/bases.
- Symbols:
-
Player Actions:
- Build: Select unit type and adjacent empty cell.
- Move: Click unit, then destination cell.
- Attack: Click unit, then target enemy.
-
Resource Panel:
Current resources, turn counter, unit count.
Example Turn
-
Player Turn:
- Build: Spend 30 resources to build a Tank at (0,1).
- Move: Move Soldier from (0,0) to (1,0).
- Attack: Soldier attacks Enemy Tank at (2,0) → Enemy Tank HP: 185.
-
AI Turn:
- Build: AI builds a Soldier at (9,8).
- Move: AI Tank moves from (9,9) to (7,9).
- Attack: AI Soldier attacks Player Soldier → Player Soldier HP: 85.
Advanced Features
- Upgrades: Spend resources to boost unit stats.
- Weather: Rain reduces movement by 1, fog limits visibility.
- Events: Random events (e.g., "Reinforcements arrive!").