Added protections against AIs infinite looping: if you take more than 2s to execute a method you lose the game.