~bigbes/game-prototype-ftl

ref: edeadad75783de943359029c1a5ea67fd51d3978 game-prototype-ftl/combat_test.go -rw-r--r-- 9.6 KiB
1b674aa5 — Eugene Blikh 6 days ago
feat(crew): restrict movement to room cell slots

Add per-room cell slots and limit crew movement to unoccupied cells.

- Add Cells field to Room and populate two slots per player room.
- Shift enemy-ship cells by the same x-offset as rooms.
- Build a cellSet lookup and gate moves on it, skipping occupied cells.
- Add cellOccupied check so two crew cannot share a slot.
- Render dim cell markers in render.go.
- Cover cellSet and occupancy with tests; tighten hit-flash test timing.
cbe6e623 — Eugene Blikh 30 days ago
combat: Combat data + updateCombat with tests

PH1 of combat task: pure tick logic.

- combat.go: GameResult/CombatSide/Combat types, NewCombat,
  playerShieldMax, resolveIncoming, updateCombat. Constants
  WeaponChargeMax/ShieldRegen/EnemyFireInterval/HitFlashDuration/
  PlayerHullMax/EnemyHullMax. Imports math/rand only (IV1).
- combat_test.go: 17 tests covering initial state, shield max,
  shield absorb / hull damage / hull clamp / evasion miss-and-hit
  in resolveIncoming, post-result no-op, hit-flash tick, shield
  regen and clamp-on-power-drop, weapon fires / no-charge-when-zero,
  enemy fires on timer, victory and defeat transitions, determinism.

Tests cannot execute in this Claude Code session (Ebitengine GLFW
init requires a display); compile + vet are clean.

Refs: docs/tasks/combat.md PH1