End of game recognition, client and server