Skip to main content

apply_action

Function apply_action 

Source
pub fn apply_action(
    state: &mut GameState,
    action: Action,
    geom: &mut SimGeometry,
)
Expand description

Apply one Action to the canonical GameState. Pure data: no I/O, no time, no threading. Called from both the native sim thread (on mpsc::recv_timeout returning Ok) and the web rAF loop.