Skip to main content

Module steer

Module steer 

Source
Expand description

A unit’s path as the cursor steers it: the player draws a route by moving the cursor, and the path follows. A grid skin draws it (MapScene::path).

Functions§

steer
The path after the cursor moves to to. path runs from the unit’s tile (never empty); valid says whether a path is legal (the game’s rules: the unit’s move points, who stands where), and cheapest gives the cheapest path to a tile, or None if the unit can’t reach it (shuyi_core::Reach::path_to).