Implement end of game listener