Fix a bug in judgeWhoWins()