~ubuntu-branches/ubuntu/intrepid/gnome-games/intrepid

« back to all changes in this revision

Viewing changes to blackjack/src/hand.cpp

  • Committer: Package Import Robot
  • Author(s): Didier Roche
  • Date: 2008-10-21 00:30:34 UTC
  • mfrom: (1.1.58)
  • Revision ID: package-import@ubuntu.com-20081021003034-cb0iknvzten935zn
Tags: 1:2.24.1-0ubuntu1
* New upstream release (LP: #286667)
  - General:
    - Fix up compatiblity with Gtk/Glib 2.14
    - Reclassify Gnibbles as Arcade game not logic game
    - Read saved window configuration from correct GConf group (affects
      gnometris, gnibbles, gnobots)
  - Aisleriot:
    - Remove vestigal flowRoot elements from solitaire svg icons. They
      caused a black box when rendering.
    - Don't crash when the session manager terminates aisleriot
  - GLChess:
    - Fix crash in error handler when GGZ connection closed
    - Fix crash in empty scene when no AI engines available
    - Fix crash when have OpenGL libraries but cannot get valid display
    - Implement GGZ config parser instead of using Python config parser
      which does not handle '%' characters as GGZ does
    - Ignore GGZ server remove player/table for unknown players/tables
    - Handle exceptions loading OpenGL textures
    - Reset pause menu when starting new game
    - Only allow one new/load game dialog to be visible at once
    - Fix incorrect function call for single buffered 3D display
    - Handle fork() errors in AI processes
    - Fixes to compile in Solaris
    - Print failure to start message to stdout if cannot import GTK+
    - Handle invalid response from glRenderMode(GL_RENDER) and print
      debugging information
    - More logging messages about selection rendering bugs
    - After looking at failure case in PyOpenGL code we don't need to change
      render modes after failed to change to GL_SELECT
    - Fix potential bugs found by PyChecker
    - Fix crash when validly claiming a draw
    - Don't display failed to claim draw dialog when successfully claimed
      draw
  - GTali:
    - Undoing 5 of a kind reduces the score by 50 as there might be multiple
      scores (LP: #238978)
  - Sudoku:
    - Add not overwrite time and also remember to actually save the time in
      the file (LP: #279616)
    - Correct typo in error message that led to an exception
  - Gnotravex:
    - Stop paused tiles becoming visible after changing colour settings
  - Blackjack:
    - Fix compiler warnings

Show diffs side-by-side

added added

removed removed

Lines of Context:
156
156
 
157
157
        if (dealer_count > 21)
158
158
                dealer_count = 0;
159
 
        if (player_count <= 21)
 
159
        if (player_count <= 21) {
160
160
                if (player_count > dealer_count)
161
161
                        results = 1;
162
 
                else 
163
 
                        if (player_count == dealer_count)
164
 
                                results = 0;
 
162
                else if (player_count == dealer_count)
 
163
                        results = 0;
 
164
        }
165
165
 
166
166
        return results;
167
167
}
261
261
                                                                FALSE);
262
262
                }
263
263
                if (dealer->cards[0].value () == 1) {
264
 
                        if (insurance = get_insurance_choice ())
 
264
                        insurance = get_insurance_choice ();
 
265
                        if (insurance)
265
266
                                bj_adjust_balance (-1 * player->wager / 2);
266
267
                }
267
268
        }
429
430
                                dealer_count = 0;
430
431
                        player = (PlayerHand*) g_list_nth_data (playerHands,0);
431
432
                        while (player != NULL) {
432
 
                                if (player->getCount () <= 21)
 
433
                                if (player->getCount () <= 21) {
433
434
                                        if (player->getCount () > dealer_count)
434
435
                                                bj_adjust_balance (player->wager * 2);
435
436
                                        else if (player->getCount () == dealer_count)
436
437
                                                bj_adjust_balance (player->wager);
 
438
                                }
437
439
                                player = player->nextHand;
438
440
                        }
439
441
                }
657
659
                        else
658
660
                                check_splits = FALSE;
659
661
 
660
 
                        if (player->getCount () >= 21) 
 
662
                        if (player->getCount () >= 21) {
661
663
                                if (player->nextHand == NULL) {
662
664
                                        check_splits = FALSE;
663
665
                                        allSettled = FALSE;
665
667
                                }
666
668
                                else
667
669
                                        player = player->nextHand;
 
670
                        }
668
671
                        
669
672
                        bj_hand_show_dealer_probabilities ();
670
673
                        bj_hand_show_options ();