         return
 
     reset: =>
+        ###
+            Event Function (passed in as a callback or bound to a button press)
+
+            Resets the code editor and the visual.
+        ###
         @environment.stats.resetCount += 1
-        @storeStats() 
-               
+        @storeStats()
+
         @codeEditor.resetEditor()
         @startGame false
         return
 
     runStudentCode: =>
+        ###
+            Event Function (passed in as a callback or bound to a button press)
+
+            Scans the code from the code editor and begins running the student's
+            code.
+        ###
         if @running
             return
         @running = true
         code = @codeEditor.getStudentCode()
         jQuery('#compileAndRun').hide()
         jQuery('#stopRun').show()
-        
+
         @environment.stats.runCount += 1
-        @storeStats()        
-        
+        @storeStats()
+
         if @environment.backEnd == 'interpreter'
             @codeEditor.scan()
             if not @canRun

        return

    generateCharacter: (name, x, y, staysOnReset, dir) ->
        base = deepcopy @config.game.characterBase[name]
        visualBase = deepcopy @config.visual.visualBase[base.sprite]
        base.x = x

        return

    storeStats: ->
        ###
            Internal Function (used only by the code in this file)

            Saves the game statistics to codeland.
        ###
        @environment.codeland.storeGameStats @environment.key, @environment.stats
        return

    setUpGame: ->
        ###
            Internal Function (used only by the code in this file)

            Sets up everything for the game to run.
            That is, the code editor, the game visual and the event listeners.
        ###
        @gameDiv = jQuery @environment.gamediv
        @gameDiv.empty()
