     checkEvent: (playerX, playerY) ->
         log "Checking: X: #{playerX}, Y: #{playerY}"
         canMove = true
-        if playerX < 1 or playerX > @gameManager.config.visual.gridX + 1\
-          or playerY < (-1 * @gameManager.config.visual.gridY + 1) or playerY > 1
+        if playerX < 0 or playerX > @gameManager.config.visual.gridX\
+          or playerY < 0 or playerY > @gameManager.config.visual.gridY
             # Player is out of bounds of grid.
             canMove = false
             log "Out of bounds!"

        return canMove

    move: (steps) ->
        # Bits are more fun that lookup tables or a switch
        # sign is positive 1 for North00, East01, and -1 for South10, West11
        [sign, isEastOrWest] = [1  - (@protagonist.dir & 2), @protagonist.dir & 1]
        if isEastOrWest
            newx = @protagonist.x + sign
            newy = @protagonist.y
        unless isEastOrWest
            newx = @protagonist.x
            newy = @protagonist.y + sign

        updatePlayerPosition = @checkEvent(newx, newy)
        if updatePlayerPosition


    reset: =>
        @codeEditor.resetEditor()
        @visual.startGame @config.visual
        @gameState = new MapGameState this, @visual, @config.visual.characters
        @commandMap = new MapGameCommands @gameState
        return

    runStudentCode: =>
        @interpreter.scanText @codeEditor.getStudentCode()
        @visual.startGame @config.visual
        @gameState = new MapGameState this, @visual, @config.visual.characters
        @commandMap = new MapGameCommands @gameState
        @interpreter.executeCommands @commandMap
        return

