pub fn take_card(&mut self, i: usize) -> Option<Card> {
        if (i>0) && (i<= self.0.len()) {
            let card = self.0[i-1].clone();
            self.0.remove(i-1);
            return Some(card);
        } 
        None
    }
/// Take a card from a sequence
///
/// # Example
///
/// ```
/// use machiavelli::sequence_cards::{ Sequence, Card::* , Suit::*};
///
/// let cards = [
///     Joker, 
///     RegularCard(Heart, 1),
///     RegularCard(Heart, 2),
///     RegularCard(Heart, 3),
///     RegularCard(Club, 11)
/// ];
/// let mut sequence = Sequence::from_cards(&cards);
/// let card = sequence.take_card(2).unwrap();
///
/// assert_eq!(4, sequence.number_cards());
/// assert_eq!(RegularCard(Heart, 1), card);
/// ```
Take a card from a sequence
Take a card from a sequence
pub fn take_card(&mut self, i: usize) -> Option<Card> {
        if (i>0) && (i<= self.0.len()) {
            let card = self.0[i-1].clone();
            self.0.remove(i-1);
            return Some(card);
        } 
        None
    }
pub fn take_card ( & mut self , i : usize ) -> Option < Card > { if ( i > 0 ) && ( i <= self . 0 . len ( ) ) { let card = self . 0 [ i - 1 ] . clone ( ) ; self . 0 . remove ( i - 1 ) ; return Some ( card ) ; } None }
Take a card from a sequence
Take a card from a sequence
&mut self
i
usize
&mut self
i
usize
example
```
use machiavelli::sequence_cards::{ Sequence, Card::* , Suit::*}.

let cards = [
Joker,
RegularCard(Heart, 1),
RegularCard(Heart, 2),
RegularCard(Heart, 3),
RegularCard(Club, 11)
];
let mut sequence = Sequence::from_cards(&cards);
let card = sequence.take_card(2).unwrap().

assert_eq!(4, sequence.number_cards());
assert_eq!(RegularCard(Heart, 1), card);
```
` ` ` use machiavelli :: sequence_cards :: { Sequence Card :: * Suit :: * } . let cards = [ Joker RegularCard ( Heart 1 ) RegularCard ( Heart 2 ) RegularCard ( Heart 3 ) RegularCard ( Club 11 ) ] ; let mut sequence = Sequence :: from_cards ( &cards ) ; let card = sequence . take_card ( 2 ) . unwrap () . assert_eq! ( 4 sequence . number_cards () ) ; assert_eq! ( RegularCard ( Heart 1 ) card ) ; ` ` `