Apply actions
applyActions (required)
type ApplyActionsFn<MetaData = Record<string, unknown>> =
(gameState: GameState<MetaData>, action: Action) => void;
export const applyActions: ApplyActionsFn = (state, action) => {
if (action.type === "SpaceClick") { /* mutate state */ }
};
Called once per legal action. MUST mutate gameState in place. See actions for the Action union; see game-state for the mutation API.