day 4 logic simplification
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -59,7 +59,7 @@ fn find_winning_score(s: &str, first: bool) -> usize {
|
|||||||
}
|
}
|
||||||
if test_for_win(markers[i]) {
|
if test_for_win(markers[i]) {
|
||||||
boards_won[i] = true;
|
boards_won[i] = true;
|
||||||
if first || (!first && boards_won.iter().all(|w| *w)) {
|
if first || boards_won.iter().all(|w| *w) {
|
||||||
return compute_score(&bingo.boards[i], markers[i], draw);
|
return compute_score(&bingo.boards[i], markers[i], draw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user