generates a new game after the game ends
finally got it working on the server