/// An attempt to get a card from the deck. There might not be enough.
An attempt to get a card from the deck. There might not be enough.
An attempt to get a card from the deck . There might not be enough .
pub fn draw(&mut self) -> Result<Card, DeckError> {
        if self.count_dealt + 1 > 52 {
            Err(DeckError::NotEnoughCards)
        } else {
            let value = self.cards[self.count_dealt];
            self.count_dealt+=1;
            let card = create_card_for_value(value);
            Ok(card)
        }
    }
pub fn draw ( & mut self ) -> Result < Card , DeckError > { if self . count_dealt + 1 > 52 { Err ( DeckError :: NotEnoughCards ) } else { let value = self . cards [ self . count_dealt ] ; self . count_dealt += 1 ; let card = create_card_for_value ( value ) ; Ok ( card ) } }
An attempt to get a card from the deck.
An attempt to get a card from the deck .
&mut self