/// <summary> /// 가운데 덱에서 카드를 뒤집어 그에 맞는 처리를 진행한다. /// </summary> /// <param name="player_index"></param> /// <returns></returns> public PLAYER_SELECT_CARD_RESULT flip_process(byte player_index, TURN_RESULT_TYPE turn_result_type) { this.turn_result_type = turn_result_type; byte card_number_from_player = byte.MaxValue; if (this.turn_result_type == TURN_RESULT_TYPE.RESULT_OF_NORMAL_CARD) { card_number_from_player = this.card_from_player.number; } PLAYER_SELECT_CARD_RESULT result = flip_deck_card(card_number_from_player); if (result != PLAYER_SELECT_CARD_RESULT.COMPLETED) { return(result); } after_flipped_card(player_index); return(PLAYER_SELECT_CARD_RESULT.COMPLETED); }
/// <summary> /// 가운데 덱에서 카드를 뒤집어 그에 맞는 처리를 진행한다. /// </summary> /// <param name="player_index"></param> /// <returns></returns> public PLAYER_SELECT_CARD_RESULT flip_process(byte player_index, TURN_RESULT_TYPE turn_result_type) { this.turn_result_type = turn_result_type; byte card_number_from_player = byte.MaxValue; if (this.turn_result_type == TURN_RESULT_TYPE.RESULT_OF_NORMAL_CARD) { card_number_from_player = this.card_from_player.number; } PLAYER_SELECT_CARD_RESULT result = flip_deck_card(card_number_from_player); if (result != PLAYER_SELECT_CARD_RESULT.COMPLETED) { return result; } after_flipped_card(player_index); return PLAYER_SELECT_CARD_RESULT.COMPLETED; }
/// <summary> /// 매 턴 진행하기 전에 초기화 해야할 데이터. /// </summary> public void clear_turn_data() { this.turn_result_type = TURN_RESULT_TYPE.RESULT_OF_NORMAL_CARD; this.card_from_player = null; this.selected_slot_index = byte.MaxValue; this.card_from_deck = null; this.target_cards_to_choice.Clear(); this.same_card_count_with_player = 0; this.same_card_count_with_deck = 0; this.card_event_type = CARD_EVENT_TYPE.NONE; this.flipped_card_event_type.Clear(); this.cards_to_give_player.Clear(); this.cards_to_floor.Clear(); this.other_cards_to_player.Clear(); this.bomb_cards_from_player.Clear(); this.expected_result_type = PLAYER_SELECT_CARD_RESULT.ERROR_INVALID_CARD; this.shaking_cards.Clear(); }