edit game logic