fn take_turn(&mut self) {
        self.game_data.player_turn = if self.game_data.player_turn == 1 {
            2
        } else {
            1
        };

        //click on Change button closes first and second card
        let x1 = self.game_data.card_index_of_first_click;
        let x2 = self.game_data.card_index_of_second_click;
        self.game_data
            .vec_cards
            .get_mut(x1)
            .expect("error game_data.card_index_of_first_click ")
            .status = CardStatusCardFace::Down;
        self.game_data
            .vec_cards
            .get_mut(x2)
            .expect("error game_data.card_index_of_second_click")
            .status = CardStatusCardFace::Down;
        self.game_data.card_index_of_first_click = 0;
        self.game_data.card_index_of_second_click = 0;
        self.game_data.count_click_inside_one_turn = 0;
        self.check_invalidate_for_all_components();
    }
///fn on change for both click and we msg.
fn on change for both click and we msg.
fn on change for both click and we msg .
fn take_turn(&mut self) {
        self.game_data.player_turn = if self.game_data.player_turn == 1 {
            2
        } else {
            1
        };
        //click on Change button closes first and second card
        let x1 = self.game_data.card_index_of_first_click;
        let x2 = self.game_data.card_index_of_second_click;
        self.game_data
            .vec_cards
            .get_mut(x1)
            .expect("error game_data.card_index_of_first_click ")
            .status = CardStatusCardFace::Down;
        self.game_data
            .vec_cards
            .get_mut(x2)
            .expect("error game_data.card_index_of_second_click")
            .status = CardStatusCardFace::Down;
        self.game_data.card_index_of_first_click = 0;
        self.game_data.card_index_of_second_click = 0;
        self.game_data.count_click_inside_one_turn = 0;
        self.check_invalidate_for_all_components();
    }
fn take_turn ( & mut self ) { self . game_data . player_turn = if self . game_data . player_turn == 1 { 2 } else { 1 } ; //click on Change button closes first and second card let x1 = self . game_data . card_index_of_first_click ; let x2 = self . game_data . card_index_of_second_click ; self . game_data . vec_cards . get_mut ( x1 ) . expect ( " " ) . status = CardStatusCardFace :: Down ; self . game_data . vec_cards . get_mut ( x2 ) . expect ( " " ) . status = CardStatusCardFace :: Down ; self . game_data . card_index_of_first_click = 0 ; self . game_data . card_index_of_second_click = 0 ; self . game_data . count_click_inside_one_turn = 0 ; self . check_invalidate_for_all_components ( ) ; }
fn on change for both click and we msg.
fn on change for both click and we msg .
&mut self
&mut self