Skip to content

Instantly share code, notes, and snippets.

@auggernaut
Created July 16, 2014 02:25
Show Gist options
  • Save auggernaut/08642e1c3cfc0d6163a7 to your computer and use it in GitHub Desktop.
Save auggernaut/08642e1c3cfc0d6163a7 to your computer and use it in GitHub Desktop.
toggle flip
@state.halt()
@currentSide ?= 0
if side is 0 or side is 1
@currentSide = side
else
@currentSide = if @currentSide is 1 then 0 else 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment