implemented unit movement

This commit is contained in:
hz
2026-05-19 05:29:51 -05:00
parent b0b270f4d8
commit 14e2c26e74
6 changed files with 247 additions and 6 deletions
+5
View File
@@ -17,6 +17,7 @@ Tracks hex locations for the territory map.
- `GET /api/resources/me` Get the authenticated player's resources.
- `GET /api/units/me` Get completed units and active training for the authenticated player.
- `POST /api/units/train` Spend gold and start training a unit.
- `POST /api/units/move` Move a persisted unit squad to a visible non-rival tile.
`claim` and `put` require the same JWT issued by AuthApi.
@@ -41,6 +42,10 @@ training is completed lazily when unit state is read. Claiming an unclaimed
visible location consumes one completed Scout by deleting that Scout's training
record.
Completed Archers are stored as persisted unit instances in the `Units`
collection with their current `q`/`r` location. Archer squads can move to
visible tiles that are unclaimed or controlled by the owning player.
## Buildings
Buildings are stored on location records. `LogCamp` can be built on controlled