basic end-of-game handling