Example #1
0
texas_t* texas_new()
{
    int i;
    texas_t* texas;

    texas = (texas_t*)malloc(sizeof(texas_t));
    if(!texas)
        return 0;
    texas->b_burn = 1;
    texas->deck = deck_new(DECK_FU, 0);
    if(!texas->deck){
        texas_free(texas);
        return 0;
    }
    texas->debug = 0;
    texas->game_state = TEXAS_GAME_END;
    texas->inning = 0;
    texas->turn_time = 30;

    for(i = 0; i < TEXAS_MAX_PLAYER; i++){
        card_player_init(&(texas->players[i]), MAX_CARDS);
        texas->players[i].position = i;
    }

    return texas;
}
Example #2
0
void develop_init(void)
{
	int idx;
	if (develop_deck != NULL)
		deck_free(develop_deck);
	develop_deck = deck_new(game_params);
	for (idx = 0; idx < NUM_DEVEL_TYPES; idx++)
		is_unique[idx] = game_params->num_develop_type[idx] == 1;
}