fn is_valid_sequence_same_val(&self) -> bool {
        let mut suits_in_seq = Vec::<Suit>::new();
        let mut common_value: u8 = 0;
        for card in &self.0 {
            match card {
                RegularCard(suit, value) => {
                    if common_value == 0 {
                        common_value = *value;
                    }
                    else if (suits_in_seq.contains(&*suit)) || (*value != common_value) {
                        return false
                    }
                    suits_in_seq.push(*suit);
                }
                Joker => ()
            }
        }
        true
    }
/// check if the sequence is a valid one with a unique card value
check if the sequence is a valid one with a unique card value
check if the sequence is a valid one with a unique card value
fn is_valid_sequence_same_val(&self) -> bool {
        let mut suits_in_seq = Vec::<Suit>::new();
        let mut common_value: u8 = 0;
        for card in &self.0 {
            match card {
                RegularCard(suit, value) => {
                    if common_value == 0 {
                        common_value = *value;
                    }
                    else if (suits_in_seq.contains(&*suit)) || (*value != common_value) {
                        return false
                    }
                    suits_in_seq.push(*suit);
                }
                Joker => ()
            }
        }
        true
    }
fn is_valid_sequence_same_val ( & self ) -> bool { let mut suits_in_seq = Vec :: < Suit > :: new ( ) ; let mut common_value : u8 = 0 ; for card in & self . 0 { match card { RegularCard ( suit , value ) => { if common_value == 0 { common_value = * value ; } else if ( suits_in_seq . contains ( & * suit ) ) || ( * value != common_value ) { return false } suits_in_seq . push ( * suit ) ; } Joker => ( ) } } true }
check if the sequence is a valid one with a unique card value
check if the sequence is a valid one with a unique card value
&self
&self