Engine > Phases > Idle Phase

Default active phase during the human turn. Handles entity selection, turn end, and tower placement transitions.

#handleEntityAutoSelect

Auto-selects the first actionable unit for the current player. Called at turn start via DISPATCH from HumanSystem. No-ops if no actionable units exist.

#handlePointerLeftDown

Handles a left pointer click on the board. Entity presence is guaranteed by GameBoardView before this action is dispatched. Emits an active entity highlight and entity selected effect, then transitions to ENTITY_COMMAND if the entity belongs to the current player and has an action available, otherwise to ENTITY_SELECT.

#handleTurnEnd

Advances to the next player's turn. HIGHLIGHT_SPAWN with an empty set is picked up by diffHighlights on the view side to clear any existing spawn highlights.




© Gamesanova 2026