8C: improve game logic