diff --git a/60_Mastermind/csharp/Program.cs b/60_Mastermind/csharp/Program.cs index 13f525d7..596b552d 100644 --- a/60_Mastermind/csharp/Program.cs +++ b/60_Mastermind/csharp/Program.cs @@ -152,7 +152,7 @@ namespace Game if (isCandidate[index]) { var (candidateBlacks, candidateWhites) = guess.Compare(candidate); - if (blacks != candidateBlacks || whites != candidateWhites) + if (blacks > candidateBlacks || whites > candidateWhites) isCandidate[index] = false; } } diff --git a/60_Mastermind/javascript/mastermind.js b/60_Mastermind/javascript/mastermind.js index 40d8139e..454639a0 100644 --- a/60_Mastermind/javascript/mastermind.js +++ b/60_Mastermind/javascript/mastermind.js @@ -341,7 +341,7 @@ async function main() copy_hs(); convert_qa(); get_number(); - if (b1 != b || w1 != w) + if (b1 > b || w1 > w) ia[x] = 0; } } diff --git a/60_Mastermind/mastermind.bas b/60_Mastermind/mastermind.bas index 774c062c..861547a1 100644 --- a/60_Mastermind/mastermind.bas +++ b/60_Mastermind/mastermind.bas @@ -113,7 +113,7 @@ 1035 GOSUB 6500 1040 GOSUB 4000 1050 GOSUB 4500 -1060 IF B1<>B OR W1<>W THEN I(X)=0 +1060 IF B1>B OR W1>W THEN I(X)=0 1070 NEXT X 1080 NEXT M 1090 PRINT "I USED UP ALL MY MOVES!" diff --git a/60_Mastermind/python/mastermind.py b/60_Mastermind/python/mastermind.py index ccc2ae9c..f97705a0 100644 --- a/60_Mastermind/python/mastermind.py +++ b/60_Mastermind/python/mastermind.py @@ -133,7 +133,7 @@ def main(): human_readable_possibility = make_human_readable(numeric_possibility) #4000 comparison = compare_two_positions(human_readable_possibility, human_readable_guess) print(comparison) - if ((blacks != comparison[1]) or (whites != comparison[2])): + if ((blacks > comparison[1]) or (whites > comparison[2])): all_possibilities[i] = 0 if not turn_over: # COMPUTER DID NOT GUESS print("I USED UP ALL MY MOVES!")