How the Game Works
This project is a simple territory-control game inspired by Risk. The
board is a square grid where each tile is a
territory. Players compete to expand their control,
reinforce their holdings, and eliminate opponents.
Setup
-
The board size and player count are chosen through URL parameters,
e.g.
game.html?players=4&board=10
-
Each player starts with:
- Random territories
- A random number of pieces on them
-
Tiles can be:
- Standard 1×1 blocks
-
Special 1×2 blocks (enabled with
diffSquares=1)
- These count as one territory
- They can be attacked from more sides
Turn Flow
-
Reinforcements
-
At the start of a player’s turn, they gain new troops equal to
the number of territories they own
-
Troops are automatically placed on their territories (randomly)
-
Attacking
- Select one of your territories with at least 2 pieces
- Select an adjacent enemy territory
-
Dice battle:
- Attacker rolls up to 6 dice
- Defender rolls dice equal to defending pieces (max 6)
- Higher total wins
-
If the attacker wins:
- They capture the territory
- They move pieces in
-
Ending the Turn
- Click End Turn to pass play
- Cycle continues until only one player remains
Victory
- A player is eliminated when they have no territories left
- The last player standing wins
URL Options
?players=X → Number of players (2–8)
?board=X → Board size (5–20)
?diffSquares=1 → Enables 1×2 tiles