pub fn from_bytes(bytes: &[u8]) -> Sequence {
        let mut cards = Vec::<Card>::new(); 
        for byte_ptr in bytes {
            match Card::from_byte(*byte_ptr) {
                Some(card) => cards.push(card),
                None => ()
            }
        };
        Sequence::from_cards(&cards)
    }
/// Create a sequence from an array of bytes
///
/// # Example
///
/// ```
/// use machiavelli::sequence_cards::{ Sequence, Card::* , Suit::*};
///
/// let bytes: [u8; 5] = [0, 1, 20, 35, 51];
/// let sequence = Sequence::from_bytes(&bytes);
///
/// assert_eq!(Sequence::from_cards(&[
///     Joker, 
///     RegularCard(Heart, 1),
///     RegularCard(Club, 7),
///     RegularCard(Diamond, 9),
///     RegularCard(Spade, 12),
/// ]), sequence);
/// ```
Create a sequence from an array of bytes
Create a sequence from an array of bytes
pub fn from_bytes(bytes: &[u8]) -> Sequence {
        let mut cards = Vec::<Card>::new(); 
        for byte_ptr in bytes {
            match Card::from_byte(*byte_ptr) {
                Some(card) => cards.push(card),
                None => ()
            }
        };
        Sequence::from_cards(&cards)
    }
pub fn from_bytes ( bytes : & [ u8 ] ) -> Sequence { let mut cards = Vec :: < Card > :: new ( ) ; for byte_ptr in bytes { match Card :: from_byte ( * byte_ptr ) { Some ( card ) => cards . push ( card ) , None => ( ) } } ; Sequence :: from_cards ( & cards ) }
Create a sequence from an array of bytes
Create a sequence from an array of bytes
bytes
&[u8]
bytes
&[u8]
example
```
use machiavelli::sequence_cards::{ Sequence, Card::* , Suit::*}.



assert_eq!(Sequence::from_cards(&[
Joker,
RegularCard(Heart, 1),
RegularCard(Club, 7),
RegularCard(Diamond, 9),
RegularCard(Spade, 12),
]), sequence);
```
` ` ` use machiavelli :: sequence_cards :: { Sequence Card :: * Suit :: * } . assert_eq! ( Sequence :: from_cards ( & [ Joker RegularCard ( Heart 1 ) RegularCard ( Club 7 ) RegularCard ( Diamond 9 ) RegularCard ( Spade 12 ) ] ) sequence ) ; ` ` `