pub fn reorder(cards: &[Card]) -> (Vec<Card>, usize) {
        let (start, trio_num) = Airplane::find_size(cards);
        let mut result: Vec<Card> = Vec::new();

        if trio_num != 0 {
            for i in cards.iter().skip(start).take(3 * trio_num) {
                result.push(*i);
            }
            for i in cards.iter().take(start) {
                result.push(*i);
            }
            for i in cards.iter().skip(start + 3 * trio_num) {
                result.push(*i);
            }
        }

        (result, trio_num)
    }
// generate a vector of cards that in form of airplane
generate a vector of cards that in form of airplane
generate a vector of cards that in form of airplane
pub fn reorder(cards: &[Card]) -> (Vec<Card>, usize) {
        let (start, trio_num) = Airplane::find_size(cards);
        let mut result: Vec<Card> = Vec::new();
        if trio_num != 0 {
            for i in cards.iter().skip(start).take(3 * trio_num) {
                result.push(*i);
            }
            for i in cards.iter().take(start) {
                result.push(*i);
            }
            for i in cards.iter().skip(start + 3 * trio_num) {
                result.push(*i);
            }
        }
        (result, trio_num)
    }
pub fn reorder ( cards : & [ Card ] ) -> ( Vec < Card > , usize ) { let ( start , trio_num ) = Airplane :: find_size ( cards ) ; let mut result : Vec < Card > = Vec :: new ( ) ; if trio_num != 0 { for i in cards . iter ( ) . skip ( start ) . take ( 3 * trio_num ) { result . push ( * i ) ; } for i in cards . iter ( ) . take ( start ) { result . push ( * i ) ; } for i in cards . iter ( ) . skip ( start + 3 * trio_num ) { result . push ( * i ) ; } } ( result , trio_num ) }
generate a vector of cards that in form of airplane
generate a vector of cards that in form of airplane
cards
&[Card]
cards
&[Card]