Skip to content

Instantly share code, notes, and snippets.

@nthx
Created October 9, 2012 01:53
Show Gist options
  • Save nthx/3856121 to your computer and use it in GitHub Desktop.
Save nthx/3856121 to your computer and use it in GitHub Desktop.
Example of a view
class WebGui
initialize: =>
@mainScreen = new Screen('template-game-main')
showWelcome: =>
@mainScreen.show()
@mainScreen.find('.game-start-button').click @startBtnClicked
startBtnClicked: =>
stopGameAndShowResults: (memory) =>
@resultsScreen = new Screen('template-game-results',
memoryPoints: memory.currentGame().roundAllPoints()
memoryHighscore: memory.hiscore()
)
@resultsScreen.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment