                 temp.push null
             @picture.push temp
 
-        for name,character of @gameConfig.characters
+        for name, character of @gameConfig.characters
             if name.indexOf('Border') == -1
                 character.color = character.sprite
                 @picture[character.x][character.y] = character

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

    getGameCommands: ->
        ###
            External Function (used by something outside of this file)

            Returns a handle to this games commands (a class).
        ###
        return @gameCommands

    clock: =>
        ###
            Internal Function (used only by the code in this file)

            The main engine behind the game.
            This function is called every X milliseconds via setInterval.
            Each time it is called it updates the visual and every Y times
            it is called it checks for events and executes the next command
            in the queue.
        ###
        if @startedGame == true
            if @tick % 30 == 0
                @checkEvents()
