Unfixes the fix introduced in a previous commit regarding how the computer deduces the answer. ReadMe updated with a thorough explanation of the deduction process.

This commit is contained in:
Joe Nellis
2022-04-08 21:59:14 -07:00
parent 603efe0d7d
commit 5ff1717a53
6 changed files with 389 additions and 283 deletions

View File

@@ -325,7 +325,7 @@ fn main() {
if *b.1 { //filter out ones we already know aren't possible
let mut tmp_guess = GUESS::new(CODE::new_from_int(b.0, num_colors, num_positions));
tmp_guess.evaluate(&answer);
if blacks > tmp_guess.blacks || whites > tmp_guess.whites { //if number of blacks/whites is different, set it to false
if blacks != tmp_guess.blacks || whites != tmp_guess.whites { //if number of blacks/whites is different, set it to false
*b.1 = false;
}
}