added GUI end of game recognition