last game logic