         return
 
     gameWon: =>
+        if not @startedGame
+            return
         clearInterval clockHandle
         playAudio 'victory.ogg'
         @stars += 1
         @score += 5
+        @startedGame = false
         @gameManager.gameWon @score, @stars
         return
 
     gameLost: =>
+        if not @startedGame
+            return
         if clockHandle?
             clearInterval clockHandle
         for name, character of @gameConfig.characters
             if @visual.getState(character.index) != 5
                 @visual.changeState character.index, 4
             character.moves = null
+        @startedGame = false
         playAudio 'defeat.ogg'
-        @startedGame = false
         alert "Try again!"
         clockHandle = setInterval @clock, 17
         return

        return moved

    checkCanMove: (newX, newY, character) ->
        if newX < 0 or newX >= @gameManager.config.visual.grid.gridX\
          or newY < 0 or newY >= @gameManager.config.visual.grid.gridY
            # Player is out of bounds of grid.
            if character == @protagonist
                if newX < -1 or newX >= @gameManager.config.visual.grid.gridX + 1\
                  or newY < -1 or newY >= @gameManager.config.visual.grid.gridY + 1
                    @gameLost()
                else
                    return false
            return true

        if character.group?

                    if character.AI.failed[command.key]?
                        for aiCommand in character.AI.failed[command.key]
                            @executeAICommand character, aiCommand
        if character == @protagonist and character.moves.length == 0
            @protagonistDoneMoving = true
        if character.AI? and character.moves.length == 0
            for aiCommand in character.AI.normal
                @executeAICommand character, aiCommand
