         @tick++
         return
 
-    # Careful ...Destructive; can only be used once
-    # Returns true if the picture was correctly painted
     checkPainting: ->
+        ###
+            Internal Function (used only by the code in this file)
+
+            Returns whether or not the painting has been filled
+            out correctly.
+        ###
+        correct = true
         #Check border filling
         for name, pixel of @gameConfig.characters
             expected = pixel.match

if not deepcopy?
    deepcopy = (src) -> $.extend(true, {},src)

class window.PaintGameState
    clockHandle = null

    constructor: (@gameManager, waitForCode) ->
        @gameConfig = deepcopy @gameManager.config.game
        @gameCommands = new PaintGameCommands @
        @visual = @gameManager.visual

        return if not @startedGame
        @stopGame()
        @gameManager.gameWon()
        return

    gameLost: =>
        return if not @startedGame
        @stopGame()
        @gameManager.gameLost()
        return

    stopGame: =>
        clearInterval clockHandle if clockHandle?
        clockHandle=null
        @startedGame = false
        return

