Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Nervonment committed Jun 14, 2024
1 parent 5ddd062 commit e39f23b
Showing 1 changed file with 24 additions and 21 deletions.
45 changes: 24 additions & 21 deletions src/techniques/naked_subsets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,29 +376,32 @@ where
removes,
}
});
if self.0.is_none() {
self.0 =
naked_subset(k, state, |r, c| (r, c)).map(|(house, cells, nums, removes)| {
NakedSubsetInfo {
k,
house: House::Row(house),
cells,
nums,
removes,
}
});
if self.0.is_none() {
self.0 = naked_subset(k, state, |r, c| (c, r)).map(
|(house, cells, nums, removes)| NakedSubsetInfo {
k,
house: House::Column(house),
cells,
nums,
removes,
},
);
if self.0.is_some() {
return;
}

self.0 = naked_subset(k, state, |r, c| (r, c)).map(|(house, cells, nums, removes)| {
NakedSubsetInfo {
k,
house: House::Row(house),
cells,
nums,
removes,
}
});
if self.0.is_some() {
return;
}

self.0 = naked_subset(k, state, |r, c| (c, r)).map(|(house, cells, nums, removes)| {
NakedSubsetInfo {
k,
house: House::Column(house),
cells,
nums,
removes,
}
});
}
}
fn appliable(&self) -> bool {
Expand Down

0 comments on commit e39f23b

Please sign in to comment.