 
     #
     # ----------------------------- Rendering Rewrite START
-
 #    @scene = new Scene {
 #      game: @game
-#      debugRender: true
 #    }
 #    @tileMap = new TileMap("keep")
 #    @scene.addObject(@tileMap)

    mapView = new MapView(this)
    @setView(mapView)

  getSoundSetting : =>
    Device.getSetting("sound", true)

  setSoundSetting : (value) =>
    Device.setSetting("sound", value)

  getMusicSetting : =>
    Device.getSetting("music", true)

  setMusicSetting : (value) =>
    Device.setSetting("music", value)
    if (value)
      @resumeMusic()
    else
      @stopMusic()

  getCombatMusicSetting : =>
    Device.getSetting("combatMusic", true)

  setCombatMusicSetting : (value) =>
    Device.setSetting("combatMusic", value)

  getFastSetting : =>
    Device.getSetting("fast", false)

  setFastSetting : (value) =>
    Device.setSetting("fast", value)

  startNewGame : (game) =>
    @game = game
    club = @game.createItem(Library.getItemTemplateByName("Crude Club"))

    @buttonGrid.draw()
    # Test.run()

  getSoundSetting : =>
    Device.getSetting("sound", true)

  setSoundSetting : (value) =>
    Device.setSetting("sound", value)

  getMusicSetting : =>
    Device.getSetting("music", true)

  setMusicSetting : (value) =>
    Device.setSetting("music", value)
    if (value)
      @resumeMusic()
    else
      @stopMusic()

  getCombatMusicSetting : =>
    Device.getSetting("combatMusic", true)

  setCombatMusicSetting : (value) =>
    Device.setSetting("combatMusic", value)

  getFastSetting : =>
    Device.getSetting("fast", false)

  setFastSetting : (value) =>
    Device.setSetting("fast", value)

  playSound : (sound) =>
    if (@getSoundSetting())
      playAudio(sound)

  playMusic : (track) =>
    @music = track
    console.log("Music setting: '" + @getMusicSetting() + "'.")
    if (@getMusicSetting())
      console.log("Play track '" + track + "'.")
      playTrack(track)

  playCombatMusic : =>
    if (@getCombatMusicSetting())
      playTrack(Data.combatMusic)

  stopMusic : =>
    stopTrack()

  resumeMusic : =>
    if (@music)
      @playMusic(@music)

  setSize:(size) ->
    console.log("Get contexts")
    switch size
