Implemented method for ending a game.