pub fn from_bytes(bytes: &[u8]) -> Table {
        let mut cur_seq = Vec::<u8>::new();
        let mut sequences = Nil;
        let mut number_sequences: usize = 0;
        for i in 0..bytes.len() {
            match bytes[i] {
                255 => {
                    number_sequences += 1;
                    sequences = Cons(Sequence::from_bytes(&cur_seq), Box::new(sequences));
                    cur_seq = Vec::<u8>::new();
                },
                n => {
                    cur_seq.push(n);
                }
            }
        }
        Table {
            number_sequences,
            sequences
        }
    }
/// Get a table from a sequence of bytes
///
/// Sequences of cards are separated by 255.
///
/// # Example 
/// ```
/// use machiavelli::table::*;
/// use machiavelli::sequence_cards::*;
///
/// let mut table1 = Table::new();
/// table1.add(Sequence::from_cards(&[
///     RegularCard(Diamond, 4), 
///     RegularCard(Diamond, 5), 
///     RegularCard(Diamond, 6), 
/// ]));
/// table1.add(Sequence::from_cards(&[
///     RegularCard(Heart, 11), 
///     RegularCard(Heart, 12), 
///     RegularCard(Heart, 13), 
/// ]));
///
/// let seq_bytes: Vec<u8> = vec![30,31,32,255,11,12,13,255];
/// let table2 = Table::from_bytes(&seq_bytes);
///
/// assert_eq!(table1, table2);
/// ```
Get a table from a sequence of bytes
Sequences of cards are separated by 255.
Get a table from a sequence of bytes Sequences of cards are separated by 255 .
pub fn from_bytes(bytes: &[u8]) -> Table {
        let mut cur_seq = Vec::<u8>::new();
        let mut sequences = Nil;
        let mut number_sequences: usize = 0;
        for i in 0..bytes.len() {
            match bytes[i] {
                255 => {
                    number_sequences += 1;
                    sequences = Cons(Sequence::from_bytes(&cur_seq), Box::new(sequences));
                    cur_seq = Vec::<u8>::new();
                },
                n => {
                    cur_seq.push(n);
                }
            }
        }
        Table {
            number_sequences,
            sequences
        }
    }
pub fn from_bytes ( bytes : & [ u8 ] ) -> Table { let mut cur_seq = Vec :: < u8 > :: new ( ) ; let mut sequences = Nil ; let mut number_sequences : usize = 0 ; for i in 0 .. bytes . len ( ) { match bytes [ i ] { 255 => { number_sequences += 1 ; sequences = Cons ( Sequence :: from_bytes ( & cur_seq ) , Box :: new ( sequences ) ) ; cur_seq = Vec :: < u8 > :: new ( ) ; } , n => { cur_seq . push ( n ) ; } } } Table { number_sequences , sequences } }
Get a table from a sequence of bytes
Sequences of cards are separated by 255.
Get a table from a sequence of bytes Sequences of cards are separated by 255 .
bytes
&[u8]
bytes
&[u8]
example 
```
use machiavelli::table::*;
use machiavelli::sequence_cards::*.

let mut table1 = Table::new();
table1.add(Sequence::from_cards(&[
RegularCard(Diamond, 4),
RegularCard(Diamond, 5),
RegularCard(Diamond, 6),
]));
table1.add(Sequence::from_cards(&[
RegularCard(Heart, 11),
RegularCard(Heart, 12),
RegularCard(Heart, 13),
])).




` ` ` use machiavelli :: table :: * ; use machiavelli :: sequence_cards :: * . let mut table1 = Table :: new () ; table1 . add ( Sequence :: from_cards ( & [ RegularCard ( Diamond 4 ) RegularCard ( Diamond 5 ) RegularCard ( Diamond 6 ) ] )) ; table1 . add ( Sequence :: from_cards ( & [ RegularCard ( Heart 11 ) RegularCard ( Heart 12 ) RegularCard ( Heart 13 ) ] )) .