Skip to content

Instantly share code, notes, and snippets.

@IntegerMan
Created October 21, 2019 05:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IntegerMan/d5170b10329dfd62b55aad8014101e47 to your computer and use it in GitHub Desktop.
Save IntegerMan/d5170b10329dfd62b55aad8014101e47 to your computer and use it in GitHub Desktop.
let decreaseTimer (state: GameState) =
if state.SimState = Simulating then
if state.TurnsLeft > 0 then
{state with TurnsLeft = state.TurnsLeft - 1}
else
{state with TurnsLeft = 0; SimState = Lost}
else
state
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment