detects and indicates endgame, click to reset