- GtkWidget *window;
- game_t game;
-
- srand(time(NULL));
-
- gtk_init (&argc, &argv);
-
- game_init(&game);
- deck_print(&game.deck);
- deck_spread(&game.deck);
- //deck_deal(&game, &game.deck);
- //hand_print(&game);
- //deck_print(&game.deck);
-
- /* Create a new window */
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_default_size (GTK_WINDOW (window),
- GAME_WINDOW_DEFAULT_WIDTH,
- GAME_WINDOW_DEFAULT_HEIGHT);
-
- gtk_widget_set_events (window,
- GDK_EXPOSURE_MASK |
- GDK_KEY_PRESS_MASK |
- GDK_BUTTON_MOTION_MASK |
- GDK_BUTTON_PRESS_MASK |
- GDK_BUTTON_RELEASE_MASK);
-
- g_signal_connect (G_OBJECT (window), "delete_event",
- G_CALLBACK (gtk_main_quit), NULL);
- g_signal_connect (G_OBJECT (window), "expose_event",
- G_CALLBACK (on_expose_event), &game);
- g_signal_connect (G_OBJECT (window), "key_press_event",
- G_CALLBACK (on_key_press_event), &game);
- g_signal_connect (G_OBJECT (window), "button_press_event",
- G_CALLBACK (on_button_press_event), &game);
- g_signal_connect (G_OBJECT (window), "button_release_event",
- G_CALLBACK (on_button_release_event), &game);
- g_signal_connect (G_OBJECT (window), "motion_notify_event",
- G_CALLBACK (on_button_motion_event), &game);
-
-
- gtk_widget_show_all (window);
- gtk_main ();
-
- return 0;
+ GtkWidget *window;
+ game_t game;
+
+ srand(time(NULL));
+
+ gtk_init (&argc, &argv);
+
+ game_init(&game);
+ deck_print(&game.deck);
+ deck_spread(&game.deck);
+ deck_deal(&game, &game.deck);
+ //hand_print(&game, 0); //With Zero being passed, will print hand for player 1(players[0])
+ //deck_print(&game.deck);
+
+ /* Create a new window */
+ window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_default_size (GTK_WINDOW (window),
+ GAME_WINDOW_DEFAULT_WIDTH,
+ GAME_WINDOW_DEFAULT_HEIGHT);
+
+ gtk_widget_set_events (window,
+ GDK_EXPOSURE_MASK |
+ GDK_KEY_PRESS_MASK |
+ GDK_BUTTON_MOTION_MASK |
+ GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK);
+
+ g_signal_connect (G_OBJECT (window), "delete_event",
+ G_CALLBACK (gtk_main_quit), NULL);
+ g_signal_connect (G_OBJECT (window), "expose_event",
+ G_CALLBACK (on_expose_event), &game);
+ g_signal_connect (G_OBJECT (window), "key_press_event",
+ G_CALLBACK (on_key_press_event), &game);
+ g_signal_connect (G_OBJECT (window), "button_press_event",
+ G_CALLBACK (on_button_press_event), &game);
+ g_signal_connect (G_OBJECT (window), "button_release_event",
+ G_CALLBACK (on_button_release_event), &game);
+ g_signal_connect (G_OBJECT (window), "motion_notify_event",
+ G_CALLBACK (on_button_motion_event), &game);
+
+
+ gtk_widget_show_all (window);
+ gtk_main ();
+
+ return 0;