Pathfinding and movement range #5

Open
opened 2026-08-06 21:51:49 +00:00 by icub3d · 0 comments
Owner

Movement: where can this unit go, what path does it take, and show it.

Scope

  • A* over the grid, respecting walkable tiles and step height. Occupied tiles block.
  • Flood-fill of the reachable set for a given movement allowance.
  • Render the reachable set with MOVEMENT_RANGE (teal) and the previewed path with
    SELECTION_CONFIRMED (lavender), both from theme::semantic.

Acceptance criteria

  • Tie-breaking is deterministic and explicitly ordered — never dependent on
    HashMap iteration (CLAUDE.md § Determinism). A test asserts the same start and
    goal always yield the identical path, not merely an equal-cost one.
  • Unit tests cover: no path exists, path around an obstacle, path blocked by a unit,
    allowance exactly reaching versus one short.
  • Pathfinding is pure logic with no rendering dependency, testable headlessly.
  • The range overlay is paired with a non-colour cue for accessibility.

Notes

Elevation cost and any climb rules are M2. This issue only needs paths to be correct
on the flat and to respect blocked tiles.

Movement: where can this unit go, what path does it take, and show it. ## Scope - A* over the grid, respecting walkable tiles and step height. Occupied tiles block. - Flood-fill of the reachable set for a given movement allowance. - Render the reachable set with `MOVEMENT_RANGE` (teal) and the previewed path with `SELECTION_CONFIRMED` (lavender), both from `theme::semantic`. ## Acceptance criteria - [ ] Tie-breaking is deterministic and explicitly ordered — never dependent on `HashMap` iteration (`CLAUDE.md` § Determinism). A test asserts the same start and goal always yield the identical path, not merely an equal-cost one. - [ ] Unit tests cover: no path exists, path around an obstacle, path blocked by a unit, allowance exactly reaching versus one short. - [ ] Pathfinding is pure logic with no rendering dependency, testable headlessly. - [ ] The range overlay is paired with a non-colour cue for accessibility. ## Notes Elevation *cost* and any climb rules are M2. This issue only needs paths to be correct on the flat and to respect blocked tiles.
Sign in to join this conversation.
No description provided.