Implemented end of game.