C# Class CGostopEngine, freegostop

맞고의 룰을 구현한 클래스.
Datei anzeigen Open project: sunduk/freegostop Class Usage Examples

Public Methods

Method Description
CGostopEngine ( ) : System
clear_turn_data ( ) : void

매 턴 진행하기 전에 초기화 해야할 데이터.

flip_process ( byte player_index, TURN_RESULT_TYPE turn_result_type ) : PLAYER_SELECT_CARD_RESULT

가운데 덱에서 카드를 뒤집어 그에 맞는 처리를 진행한다.

get_next_player_index ( ) : byte
get_random_cards ( int n ) : List
has_kookjin ( byte player_index ) : bool
is_finished ( ) : bool
is_last_turn ( ) : bool
is_time_to_ask_gostop ( ) : bool
move_to_next_player ( ) : void
on_choose_card ( byte player_index, PLAYER_SELECT_CARD_RESULT result_type, byte choice_index ) : PLAYER_SELECT_CARD_RESULT
player_put_card ( byte player_index, byte card_number, PAE_TYPE pae_type, byte position, byte slot_index, byte is_shaking ) : PLAYER_SELECT_CARD_RESULT

플레이어가 카드를 낼 때 호출된다.

reset ( ) : void

게임 한판 시작 전에 초기화 해야할 데이터.

start ( List players ) : void

Private Methods

Method Description
after_flipped_card ( byte player_index ) : void

카드를 뒤집은 후 처리해야할 내용들을 진행한다.

calculate_players_score ( ) : void
check_bonus_cards ( ) : void
distribute_cards ( ) : void
find_next_player_index_of ( byte prev_player_index ) : byte
flip_deck_card ( byte card_number_from_player ) : PLAYER_SELECT_CARD_RESULT
get_current_player ( ) : CPlayerAgent,
give_floor_cards_to_player ( byte player_index ) : void
pop_front_card ( ) : CCard
shuffle ( ) : void
sort_player_pae ( ) : void
take_cards_from_others ( byte pee_count ) : void

Method Details

CGostopEngine() public method

public CGostopEngine ( ) : System
return System

clear_turn_data() public method

매 턴 진행하기 전에 초기화 해야할 데이터.
public clear_turn_data ( ) : void
return void

flip_process() public method

가운데 덱에서 카드를 뒤집어 그에 맞는 처리를 진행한다.
public flip_process ( byte player_index, TURN_RESULT_TYPE turn_result_type ) : PLAYER_SELECT_CARD_RESULT
player_index byte
turn_result_type TURN_RESULT_TYPE
return PLAYER_SELECT_CARD_RESULT

get_next_player_index() public method

public get_next_player_index ( ) : byte
return byte

get_random_cards() public method

public get_random_cards ( int n ) : List
n int
return List

has_kookjin() public method

public has_kookjin ( byte player_index ) : bool
player_index byte
return bool

is_finished() public method

public is_finished ( ) : bool
return bool

is_last_turn() public method

public is_last_turn ( ) : bool
return bool

is_time_to_ask_gostop() public method

public is_time_to_ask_gostop ( ) : bool
return bool

move_to_next_player() public method

public move_to_next_player ( ) : void
return void

on_choose_card() public method

public on_choose_card ( byte player_index, PLAYER_SELECT_CARD_RESULT result_type, byte choice_index ) : PLAYER_SELECT_CARD_RESULT
player_index byte
result_type PLAYER_SELECT_CARD_RESULT
choice_index byte
return PLAYER_SELECT_CARD_RESULT

player_put_card() public method

플레이어가 카드를 낼 때 호출된다.
public player_put_card ( byte player_index, byte card_number, PAE_TYPE pae_type, byte position, byte slot_index, byte is_shaking ) : PLAYER_SELECT_CARD_RESULT
player_index byte
card_number byte
pae_type PAE_TYPE
position byte
slot_index byte
is_shaking byte
return PLAYER_SELECT_CARD_RESULT

reset() public method

게임 한판 시작 전에 초기화 해야할 데이터.
public reset ( ) : void
return void

start() public method

public start ( List players ) : void
players List
return void