Skip to content

Instantly share code, notes, and snippets.

@ryansroberts
Forked from leecrossley/Happy Panda.
Created March 28, 2012 12:54
Show Gist options
  • Save ryansroberts/2225893 to your computer and use it in GitHub Desktop.
Save ryansroberts/2225893 to your computer and use it in GitHub Desktop.
Panda: I MADE IT BETTER
panda = (->
bambooLevel = 0
isAsleep = false
wakeUp = -> isAsleep = false
eatBamboo: -> ++bambooLevel
goToSleep: ->
isAsleep = true
setTimeout wakeUp,1000
)()
panda.eatBamboo()
panda.goToSleep()
@leecrossley
Copy link

better? let's ask Douglas...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment