gboolean tableChangeHari(GtkWidget* widget , gpointer p){ tableRefresh(""); return TRUE; char *p_newChuckIcon; p_newChuckIcon = gtk_combo_box_get_active_text(widget); g_print("%s\n",p_newChuckIcon); g_free(p_newChuckIcon); }
//! click on header static gboolean tableClickHeader(GtkTreeViewColumn *widget , gpointer user_data){ table->tittle = gtk_tree_view_column_get_title(widget); //! mencari header yang di click int x; for(x=0;x<count(headerTable);x++){ gint id ; id = g_strcmp0(table->tittle , headerTable [x]); if(id == 0) break; } databaseSortChange(x); tableRefresh(""); // soundPlay("file:/home/zizou-desktop/Aman/music/Computer_Magic-Microsift-1901299923.wav" , 1); // soundPlay("Computer_Magic-Microsift-1901299923.wav" , 1); return FALSE; }
static void tableUpdateListAlarmNTable(gboolean status){ if(status){ tableRefresh(""); alarmUpdateList(); } }
int main(){ int bets = 0, pot = 0; Deck game_deck = get_new_Deck(); printf("\n\n"); hBorder(); printf("\n\n"); welcomeSign(); hBorder(); welcome(); printf("\n"); hBorder(); printf("\n"); printf("\n"); Player one = player_init(getName(), getRupies()); printf("Hi %s, you have %i rupies\n",one.name, one.rupies); Player two = player_init("Link", one.rupies); Player three = player_init("Mario", one.rupies); Player four = player_init("Taloon", one.rupies); getStatus(&two); getStatus(&three); getStatus(&four); printf("\n\n"); hBorder(); Player *table[NUM_PLAYERS]; table[0] = &one; table[1] = &two; table[2] = &three; table[3] = &four; int gamenumber = 1; int gamesplayed = 0; int gameStatus = 1; while(gamenumber == 1){ if(gameStatus == 1){ if(gamesplayed != 0){ printf("\n\n"); welcomeSign(); hBorder(); } gamesplayed++; printf("\n\nREADY -- Here we go...\n\n"); shuffle(&game_deck, DECK_SIZE); first_Deal(&game_deck, table, NUM_PLAYERS); gamescene(3, table); print_Hand(table, 1); isHand(one.hand); bets = betAmount(&one); printf("%s, bets %i rupies\n",one.name, bets); pot += bets; /* cpuBIGACTION(table, &bets, &game_deck); #pragma omp parallel num_threads(4) int z; tid = omp_get_thread_number(); for(z=1;z<NUM_PLAYERS;z++){ if(tid == 1){ */ pot += cpuActions(&game_deck, &two, &one, bets); /* } if(tid == 1){ */ printf("...hmm...yea...\n"); pot += cpuActions(&game_deck, &three, &one, bets); /* } if(tid == 1){ */ printf("...uhhh...ok...\n"); pot += cpuActions(&game_deck, &four, &one, bets); /* } }*/ hBorder(); banter(table); playersLeft(table, &gameStatus); } if(gameStatus ==1){ print_Hand(table, 1); print_Options(); isHand(one.hand); Deck MC_Deck = create_Monte(&one); monteSuggest(monte_Analysis(&MC_Deck, &one)); printTextReco(&one); newCards(&game_deck,&one); print_Hand(table, 1); isHand(one.hand); printf("\n\n"); bets = betAmount(&one); pot += bets; pot += cpuBets(&two, &one, bets); pot += cpuBets(&three, &one, bets); pot += cpuBets(&four, &one, bets); playersLeft(table, &gameStatus); } hBorder(); printResults(table); evaluateHands(table); tableCompareTo(table); winnerIs(table, pot); hBorder(); printf("\n"); banter(table); getTableStatus(table); gamenumber = playgame(); printf("\n\n\n\n"); bets = 0; pot = 0; tableRefresh(table); } return 0; }