Brian Pang - 2006-11-04 13:48:43 -
In reply to message 1 from Brian Pang
Line 15:
$secondcard=($playnum+1);
Should be just $secondcard=$playnum;
Since the array counting starts at zero (0) the 8th position in the array is already the 9th card in the deck.
Lines 49-57:
print_r($flop[1]." ");
print_r($flop[2]." ");
print_r($flop[3]." ");
print_r($flop[5]." ");
print_r($flop[7]." ");
//create new hands that include the flop cards
$flopPlayCards=array($flop[1],$flop[2],$flop[3],$flop[5],$flop[7]);
Again, since the array begins at zero (0) the cards to use are:
0,1,2,4,6
print_r($flop[0]." ");
print_r($flop[1]." ");
print_r($flop[2]." ");
print_r($flop[4]." ");
print_r($flop[6]." ");
//create new hands that include the flop cards
$flopPlayCards=array($flop[0],$flop[1],$flop[2],$flop[4],$flop[6]);
These should more correctly be referred to as the "board" but I don't want to go changing variable names around at this time.