.map(|_| Cards::new().with_rules(&rules, &mut deck).clone())
.collect();
let mut table = Cards::new();
- table.with_cards(deck.removen(5).unwrap());
+ table.with_cards(deck.get(5).unwrap());
let result = Evaluator::new()
.with_rules(&rules)
pub fn with_rules<'a>(&'a mut self, rules: &Rules, deck: &mut Cards) -> &'a mut Cards {
match rules {
Rules::Classic => {
- self.with_cards(deck.removen(5).unwrap());
+ self.with_cards(deck.get(5).unwrap());
}
Rules::Holdem => {
- self.with_cards(deck.removen(2).unwrap());
+ self.with_cards(deck.get(2).unwrap());
}
};
self
}
- pub fn removen(&mut self, n: usize) -> Option<Cards> {
+ pub fn get(&mut self, n: usize) -> Option<Cards> {
if self.0.len() < n {
None
} else {