Fixed the game, now works properly with random moves