how many cells the cursor is from the origin, in the level's own ruler
the cell the cursor is on now, as a copy - mutating it does not move the aim
whether the current aim is legal: range, sight unless waived, and the game's own rule
Abandons the aim without confirming; the game closes its own overlay on onCancel.
Returns the confirmed target, or null when the current aim is illegal.
Moves the cursor one cell, for keyboard and gamepad navigation. On a square level the offset is added directly; on a hex level it is looked up among the cursor's six neighbours, since only the level knows which offset means which direction there. A move that would leave the map is ignored rather than clamped to its edge.
Moves the cursor to a specific cell, for pointer navigation: the caller has already turned a screen point into a cell through its own camera. Off-map cells are ignored.
The cells the current aim would affect, for a preview overlay; empty while illegal.
Replaces the shape a confirm resolves to, keeping the cursor where it is.
The input-facing half of targeting: a cursor a player moves over cells, the range and line-of-sight rule that decides whether the current aim is legal, an optional preview of the shape, and a confirm/cancel result. It carries no renderer:
moveTotakes a cell, so a game converts its own pointer position through its own camera, and the controller hands back cells for the game to draw and resolve. Legality beyond range and sight is the optionalvalidatehook's job, and damage is never the controller's business.Example