isWinningMove and avoidLoss corrected