Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
reinismu committed Oct 16, 2024
1 parent d3a1da9 commit 51b46bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/cards/evaluator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ impl Evaluator {
})
}

// different
fn find_rank_of_straight(&self, hand: Hand) -> Option<Rank> {
let wheel = WHEEL;
let ranks = u16::from(hand);
Expand Down
7 changes: 4 additions & 3 deletions src/cards/hands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ impl HandIterator {
if self.next == 0 {
true
} else {
(64 - 52) as u32 > self.next.leading_zeros()
(64 - 52) > self.next.leading_zeros()
// // ALTERNATE IMPL: mask at return, iterate as-is
// (64 - CARD_COUNT_IN_DECK) > self.next.leading_zeros() - self.mask.count_ones()
// (64 - 52) > self.next.leading_zeros() - self.mask.count_ones()
// // CURRENT IMPL: mask at iteration, return as-is
}
}
Expand Down Expand Up @@ -162,9 +162,10 @@ mod tests {
assert_eq!(iter.count(), 1128);
}

#[test]
#[cfg(not(feature = "shortdeck"))]
fn choose_3() {
let mut iter = HandIterator::from((3, Hand::from(0)));
let mut iter = HandIterator::from((3, Hand::empty()));
assert!(iter.next() == Some(Hand::from(0b00111)));
assert!(iter.next() == Some(Hand::from(0b01011)));
assert!(iter.next() == Some(Hand::from(0b01101)));
Expand Down
2 changes: 1 addition & 1 deletion src/clustering/layer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl Layer {
.collect::<Vec<Isomorphism>>();

let progress = Self::progress(isomorphisms.len());
let projection = isomorphisms// isomorphism translation
let projection = isomorphisms
.into_par_iter()
.map(|inner| (inner, self.lookup.projection(&inner)))
.inspect(|_| progress.inc(1))
Expand Down

0 comments on commit 51b46bc

Please sign in to comment.