End of game logic implemented