Just a thought on BlackJack mod

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Just a thought on BlackJack mod
Egidius
CZ Newbie
Egidius has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jan 08, 2004
0.00 posts per day
Posts: 12
Points: 1,140
   
I noticed that when one does not have two aces, an ace is counted as "1" instead of "11". After some investigating, I discovered the problem and quickly corrected it. First off, in includes/functions_blackjack.php, the line
if($dl_number == "13" OR $dl_number == "26" OR $dl_number == "39" OR $dl_number == "52") $d1_value = "1";
should be
if($dl_number == "13" OR $dl_number == "26" OR $dl_number == "39" OR $dl_number == "52") $d1_value = "11";
and
if($pl_number == "13" OR $pl_number == "26" OR $pl_number == "39" OR $pl_number == "52") $p1_value = "1";
should be
if($pl_number == "13" OR $pl_number == "26" OR $pl_number == "39" OR $pl_number == "52") $p1_value = "11";
as is correct in the unported (phpbb) v1.0.2 of this file.

The next thing that should be fixed is in modules/Forums/BlackJack.php. The lines
   /* Check For A BlackJack */
      /* Dealer Check */
   if(($dealer_value_1 == "10") && ($dealer_value_2 == "1")) $dealer = "21";
   if(($dealer_value_1 == "1") && ($dealer_value_2 == "10")) $dealer = "21";
      /* Player Check */
   if(($player_value_1 == "10") && ($player_value_2 == "1")) $player = "21";
   if(($player_value_1 == "1") && ($player_value_2 == "10")) $player = "21";
should be replaced with
   /* Check For A Pair Of Aces */
      /* Dealer Check */
   if(($dealer_value_1 == "11") && ($dealer_value_2 == "11")) $dealer = "12";
      /* Player Check */
   if(($player_value_1 == "11") && ($player_value_2 == "11")) $player = "12";
as is correct in the nonported (phpbb) v1.0.4 of the file.

On a side note, I take no credit for the fix as aUsTiN and Telli have done all the work, I just felt it might be useful if I pointed out the bug. Thanks, aUsTiN, for the awesome mod and thanks, Telli, for porting it so I don't have to icon_smile.gif


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum