Author

Topic: Open Source Bitcoin Casino (Read 3076 times)

member
Activity: 308
Merit: 10
May 24, 2011, 02:16:18 PM
#17

anisoptera, ummm... Sorry. I might be wrong about regular gambling sites taking bitcoins. I thought I saw that on one of these forums but now I can't find it. I found a thread that I thought had said this, but I actually misread the thread...

So, yeah. Sorry. I dunno if regular gambling sites are really taking bitcoins.

No problem, I was just curious if you knew something I didn't Smiley
newbie
Activity: 25
Merit: 0
May 24, 2011, 12:53:22 PM
#16

anisoptera, ummm... Sorry. I might be wrong about regular gambling sites taking bitcoins. I thought I saw that on one of these forums but now I can't find it. I found a thread that I thought had said this, but I actually misread the thread...

So, yeah. Sorry. I dunno if regular gambling sites are really taking bitcoins.
member
Activity: 308
Merit: 10
May 24, 2011, 12:45:57 PM
#15

Yeah, tomcollins. You're speaking the truth. A few of the regular gambling sites are now taking bitcoins

Which ones?
newbie
Activity: 25
Merit: 0
May 24, 2011, 12:37:28 PM
#14

Yeah, tomcollins. You're speaking the truth. A few of the regular gambling sites are now taking bitcoins, so they'll probably wind up dominating the market...

I found this open source bitcoin poker: http://poker.bitcoinvegas.com/wiki/index.php?title=Main_Page

I'm trying to work with those guys to make an API, so you can have a variety of games hooked up to any one "casino" : http://poker.bitcoinvegas.com/forum/discussion/18/open-source-casino/#Item_1

But that site seems like a ghost town...
full member
Activity: 182
Merit: 101
May 23, 2011, 11:20:36 AM
#13
I understand that open source projects involve security risks. I think these risks can be effectively managed. If anyone has productive input on open source security, please help me out instead of playa hatin. We need great security people for this project.

Bitcoin gambling is gonna happen. Is it gonna be dominated by facebook types or the open source community? We gotta do this right from the start. I'm just trying to start the discussion and organizational process.... I've also got alot of ideas on the software and stuff, so I'm mostly just trying to code that out....

And there's money involved so I'm trying to get in on the ground floor. duh. But I'm not trying to be bill gates. I just wanna job in an organization with respectable ethics...

Peace yall... Lets keep talking...

It's going to be dominated by whoever does it best and whoever markets it best.  Open source may be part of the marketing (since Bitcoin is mostly a niche community now).
member
Activity: 84
Merit: 11
May 23, 2011, 10:55:20 AM
#12
Clearly, I'm missing something.

You're a programmer who writes in ebionics?

Sorry homie.  That just doesn't jive.
newbie
Activity: 25
Merit: 0
May 22, 2011, 05:54:12 PM
#11
I understand that open source projects involve security risks. I think these risks can be effectively managed. If anyone has productive input on open source security, please help me out instead of playa hatin. We need great security people for this project.

Bitcoin gambling is gonna happen. Is it gonna be dominated by facebook types or the open source community? We gotta do this right from the start. I'm just trying to start the discussion and organizational process.... I've also got alot of ideas on the software and stuff, so I'm mostly just trying to code that out....

And there's money involved so I'm trying to get in on the ground floor. duh. But I'm not trying to be bill gates. I just wanna job in an organization with respectable ethics...

Peace yall... Lets keep talking...
legendary
Activity: 1218
Merit: 1000
May 22, 2011, 05:26:58 PM
#10
Like it uses to say "Open Source" doesn't stand for "Open to the «right» people" only, but to the "wrong" ones as well...
full member
Activity: 182
Merit: 101
May 22, 2011, 05:18:42 PM
#9
noamyoungerm, I think the opposite is true. Open source means "everyone" knows the rules, so it's harder to rig the system.

graingert, Sorry. I'm only coding an alpha version right now and I want to protect my work. I'm not very experienced in terms of managing (large) open source projects. If you want to help me out with advice on how to do things correctly, please let me know. I need help with this project, so hopefully I can assemble a core team containing someone with more open source experience.

thanks to both for you input. 1luv.

If you found a flaw, there is a huge profit motive to exploit it (unless the flaw is in favor of the house).
newbie
Activity: 25
Merit: 0
May 22, 2011, 04:54:43 PM
#8
noamyoungerm, I think the opposite is true. Open source means "everyone" knows the rules, so it's harder to rig the system.

graingert, Sorry. I'm only coding an alpha version right now and I want to protect my work. I'm not very experienced in terms of managing (large) open source projects. If you want to help me out with advice on how to do things correctly, please let me know. I need help with this project, so hopefully I can assemble a core team containing someone with more open source experience.

thanks to both for you input. 1luv.
full member
Activity: 227
Merit: 100
May 22, 2011, 02:25:41 PM
#7
If you release an open source casino, people will rig the system.

open source != wiki

just because you can read the source code does not mean you can cheat. No security trough obscurity!
newbie
Activity: 24
Merit: 0
May 22, 2011, 02:18:56 PM
#6
If you release an open source casino, people will rig the system.
newbie
Activity: 25
Merit: 0
May 21, 2011, 06:00:26 PM
#5

Thanks! I think I might've googled your work before. I'll let you know when I get to writing games....
legendary
Activity: 1218
Merit: 1000
May 21, 2011, 05:33:15 PM
#4
Here, have a 5 card poker hand checker I developed today for my casino.
It's already good for start. With it you can already shuffle a deck, deal and check the hand strength.
GL with your project.

Code:
    class Poker{
        
         var 
$jacks false;
         var 
$twopairs false;
         var 
$threeofakind false;
         var 
$straight false;
         var 
$flush false;
         var 
$fullhouse false;
         var 
$fourofakind false;         
         var 
$straightflush false;
         var 
$royalstraightflush false;
         var 
$held "00000";
         var 
$comb 0;
        
         var 
$card1;
         var 
$card2;
         var 
$card3;
         var 
$card4;
         var 
$card5;
        
        function 
readHand($c1,$c2,$c3,$c4,$c5,$minCval){
            global 
$deck;
            
$this->card1 $deck->getCardByNum($c1);
            
$this->card2 $deck->getCardByNum($c2);
            
$this->card3 $deck->getCardByNum($c3);
            
$this->card4 $deck->getCardByNum($c4);
            
$this->card5 $deck->getCardByNum($c5);
            
$this->held "00000";
            
$this->jacks false;
            
$this->twopairs false;
            
$this->threeofakind false;
            
$this->straight false;
            
$this->flush false;
            
$this->fullhouse false;
            
$this->fourofakind false;
            
$this->straightflush false;
            
$this->royalstraightflush false;
            
$this->checkRoyalSF();
            
$this->checkSF();
            
$this->checkFourOfAKind();
            
$this->checkFH();
            
$this->checkFlush();
            
$this->checkStr();
            
$this->check3OfAKind();
            
$this->check2Pairs();
            
$this->checkPair($minCval);
            
        }
        
        function 
faceToNum($face){
            switch(
$face){
                case 
"A": return 1; break;
                case 
"2": return 2; break;
                case 
"3": return 3; break;
                case 
"4": return 4; break;
                case 
"5": return 5; break;
                case 
"6": return 6; break;
                case 
"7": return 7; break;
                case 
"8": return 8; break;
                case 
"9": return 9; break;
                case 
"T": return 10; break;
                case 
"J": return 11; break;
                case 
"Q": return 12; break;
                case 
"K": return 13; break;
            }
        }
        
        function 
checkStrPattern($nums){
            
sort($nums);
            
$test = array(1,2,3,4,5);
            if(
$nums == $test) return true;
            
$test = array(2,3,4,5,6);
            if(
$nums == $test) return true;            
            
$test = array(3,4,5,6,7);
            if(
$nums == $test) return true;                        
            
$test = array(4,5,6,7,8);
            if(
$nums == $test) return true;                                    
            
$test = array(5,6,7,8,9);
            if(
$nums == $test) return true;                                    
            
$test = array(6,7,8,9,10);
            if(
$nums == $test) return true;                                                
            
$test = array(7,8,9,10,11);
            if(
$nums == $test) return true;                                                            
            
$test = array(8,9,10,11,12);
            if(
$nums == $test) return true;                                                                        
            
$test = array(9,10,11,12,13);
            if(
$nums == $test) return true;                                                                        
            
$test = array(1,10,11,12,13);
            if(
$nums == $test) return true
            return 
false;            
        }
        
        function 
checkPair($minCval){
            if(
$this->royalstraightflush) return;
            if(
$this->straightflush) return;
            if(
$this->fourofakind) return;
            if(
$this->fullhouse) return;
            if(
$this->flush) return;
            if(
$this->straight) return;
            if(
$this->threeofakind) return;
            if(
$this->twopairs) return;            

            
$validCards = array();
            
$z 0;
            
$pat = array(0,0,0,0,0);
            if(
$this->faceToNum($this->card1['card']) == || $this->faceToNum($this->card1['card']) > $minCval){
             
$validCards[$z]['card'] = $this->card1['card'];
             
$validCards[$z]['pos'] = 0;
             
$z++;
            }
            if(
$this->faceToNum($this->card2['card']) == || $this->faceToNum($this->card2['card']) > $minCval){
             
$validCards[$z]['card'] = $this->card2['card'];
             
$validCards[$z]['pos'] = 1;
             
$z++;
            }
            if(
$this->faceToNum($this->card3['card']) == || $this->faceToNum($this->card3['card']) > $minCval){
             
$validCards[$z]['card'] = $this->card3['card'];
             
$validCards[$z]['pos'] = 2;
             
$z++;             
            }
            if(
$this->faceToNum($this->card4['card']) == || $this->faceToNum($this->card4['card']) > $minCval){
             
$validCards[$z]['card'] = $this->card4['card'];
             
$validCards[$z]['pos'] = 3;
             
$z++;             
            }
            if(
$this->faceToNum($this->card5['card']) == || $this->faceToNum($this->card5['card']) > $minCval){
             
$validCards[$z]['card'] = $this->card5['card'];
             
$validCards[$z]['pos'] = 4;             
            }
            if(
sizeof($validCards) < 2) return;
            for(
$x 0$x <= $z$x++){
                for(
$y 0$y <= $z$y++){
                    if(
$y == $x) continue;
                    if(
$validCards[$x]['card'] == $validCards[$y]['card']){
                     
$this->jacks true;
                     
$pat[$validCards[$x]['pos']] = 1;
                     
$pat[$validCards[$y]['pos']] = 1;
                     
$this->held implode("",$pat);
                     
$this->comb 1;
                    }
                }    
            }
        }
        
        function 
check2Pairs(){
            if(
$this->royalstraightflush) return;
            if(
$this->straightflush) return;
            if(
$this->fourofakind) return;
            if(
$this->fullhouse) return;
            if(
$this->flush) return;
            if(
$this->straight) return;
            if(
$this->threeofakind) return;
            
//Pat 1: 1+2|3+4
            
if($this->card1['card'] == $this->card2['card'] && $this->card3['card'] == $this->card4['card']){
             
$this->twopairs true;
             
$this->held "11110";
             
$this->comb 2;             
            }
            
//Pat 2: 1+2|3+5
            
if($this->card1['card'] == $this->card2['card'] && $this->card3['card'] == $this->card5['card']){
             
$this->twopairs true;            
             
$this->held "11101";
             
$this->comb 2;             
            }             
            
//Pat 3: 1+2|4+5
            
if($this->card1['card'] == $this->card2['card'] && $this->card4['card'] == $this->card5['card']){
             
$this->twopairs true
             
$this->held "11011";
             
$this->comb 2;             
            }                                    
            
//Pat 4: 1+3|2+4
            
if($this->card1['card'] == $this->card3['card'] && $this->card2['card'] == $this->card4['card']){
             
$this->twopairs true;
             
$this->held "11110";
             
$this->comb 2;             
            }                         
            
//Pat 5: 1+3|2+5
            
if($this->card1['card'] == $this->card3['card'] && $this->card2['card'] == $this->card5['card']){
             
$this->twopairs true;  
             
$this->held "11101";
             
$this->comb 2;             
            }                                   
            
//Pat 6: 1+3|4+5
            
if($this->card1['card'] == $this->card3['card'] && $this->card4['card'] == $this->card5['card']){
             
$this->twopairs true;
             
$this->held "10111";
             
$this->comb 2;             
            }                                                 
            
//Pat 7: 1+4|2+3
            
if($this->card1['card'] == $this->card4['card'] && $this->card2['card'] == $this->card3['card']){
             
$this->twopairs true
             
$this->held "11110";
             
$this->comb 2;             
            }                                                
            
//Pat 8: 1+4|2+5
            
if($this->card1['card'] == $this->card4['card'] && $this->card2['card'] == $this->card5['card']){
             
$this->twopairs true;  
             
$this->held "11011";
             
$this->comb 2;             
            }                                                           
            
//Pat 9: 1+4|3+5
            
if($this->card1['card'] == $this->card4['card'] && $this->card3['card'] == $this->card5['card']){
             
$this->twopairs true
             
$this->held "10111";
             
$this->comb 2;             
            }                                                                        
            
//Pat 10: 1+5|2+3
            
if($this->card1['card'] == $this->card5['card'] && $this->card2['card'] == $this->card3['card']){
             
$this->twopairs true
             
$this->held "11101";
             
$this->comb 2;             
            }                                                                        
            
//Pat 11: 1+5|2+4
            
if($this->card1['card'] == $this->card5['card'] && $this->card2['card'] == $this->card4['card']){
             
$this->twopairs true;  
             
$this->held "11011";
             
$this->comb 2;             
            }                                                                                   
            
//Pat 12: 1+5|3+4
            
if($this->card1['card'] == $this->card5['card'] && $this->card3['card'] == $this->card4['card']){
             
$this->twopairs true;
             
$this->held "10111";
             
$this->comb 2;             
            }                                                                                                 
            
//Pat 13: 2+3|4+5
            
if($this->card2['card'] == $this->card3['card'] && $this->card4['card'] == $this->card5['card']){
             
$this->twopairs true;  
             
$this->held "01111";
             
$this->comb 2;             
            }                                                                                                           
            
//Pat 14: 2+4|3+5
            
if($this->card2['card'] == $this->card4['card'] && $this->card3['card'] == $this->card5['card']){
             
$this->twopairs true;  
             
$this->held "01111";
             
$this->comb 2;             
            }                                                                                                                       
            
//Pat 15: 2+5|3+4
            
if($this->card2['card'] == $this->card5['card'] && $this->card3['card'] == $this->card4['card']){
             
$this->twopairs true;  
             
$this->held "01111";
             
$this->comb 2;             
            }                                                                                                                                   
        }
        
        function 
check3OfAKind(){
            if(
$this->royalstraightflush) return;
            if(
$this->straightflush) return;
            if(
$this->fourofakind) return;
            if(
$this->fullhouse) return;
            if(
$this->flush) return;
            if(
$this->straight) return;
            
//Pat 1: 1+2+3
            
if($this->card1['card'] == $this->card2['card'] && $this->card2['card'] == $this->card3['card']){
             
$this->threeofakind true;            
             
$this->held "11100";
             
$this->comb 3;
            }
            
//Pat 2: 1+2+4
            
if($this->card1['card'] == $this->card2['card'] && $this->card2['card'] == $this->card4['card']){
             
$this->threeofakind true;                        
             
$this->held "11010";
             
$this->comb 3;
            }             
            
//Pat 3: 1+2+5
            
if($this->card1['card'] == $this->card2['card'] && $this->card2['card'] == $this->card5['card']){
             
$this->threeofakind true;                        
             
$this->held "11001";
             
$this->comb 3;
            }
            
//Pat 4: 1+3+4
            
if($this->card1['card'] == $this->card3['card'] && $this->card3['card'] == $this->card4['card']){
             
$this->threeofakind true;                                    
             
$this->held "10110";
             
$this->comb 3;
            }             
            
//Pat 5: 1+3+5
            
if($this->card1['card'] == $this->card3['card'] && $this->card3['card'] == $this->card5['card']){
             
$this->threeofakind true;                                                
             
$this->held "10101";
             
$this->comb 3;             
            }
            
//Pat 6: 1+4+5
            
if($this->card1['card'] == $this->card4['card'] && $this->card4['card'] == $this->card5['card']){
             
$this->threeofakind true;                                                            
             
$this->held "10011";
             
$this->comb 3;
            }                         
            
//Pat 7: 2+3+4
            
if($this->card2['card'] == $this->card3['card'] && $this->card3['card'] == $this->card4['card']){
             
$this->threeofakind true;                                                                        
             
$this->held "01110";
             
$this->comb 3;             
            }             
            
//Pat 8: 2+3+5
            
if($this->card2['card'] == $this->card3['card'] && $this->card3['card'] == $this->card5['card']){
             
$this->threeofakind true;                                                                                    
             
$this->held "01101";
             
$this->comb 3;
            }             
            
//Pat 9: 2+4+5
            
if($this->card2['card'] == $this->card4['card'] && $this->card4['card'] == $this->card5['card']){
             
$this->threeofakind true;                                                                                                
             
$this->held "01011";
             
$this->comb 3;
            }             
            
//Pat 10: 3+4+5
            
if($this->card3['card'] == $this->card4['card'] && $this->card4['card'] == $this->card5['card']){
             
$this->threeofakind true;                                                                                                            
             
$this->held "00111";
             
$this->comb 3;
            }             
        }
        
        function 
checkStr(){
            if(
$this->royalstraightflush) return;
            if(
$this->straightflush) return;
            if(
$this->fourofakind) return;
            if(
$this->fullhouse) return;
            if(
$this->flush) return;
            
$num1 $this->faceToNum($this->card1['card']);   
            
$num2 $this->faceToNum($this->card2['card']);   
            
$num3 $this->faceToNum($this->card3['card']);   
            
$num4 $this->faceToNum($this->card4['card']);   
            
$num5 $this->faceToNum($this->card5['card']);   
            
$this->straight $this->checkStrPattern(array($num1,$num2,$num3,$num4,$num5)); 
             if(
$this->straight){
                 
$this->held "11111";
                 
$this->comb 4;
             }                                   
        }
        
        function 
checkFlush(){
            if(
$this->royalstraightflush) return;
            if(
$this->straightflush) return;
            if(
$this->fourofakind) return;
            if(
$this->fullhouse) return;
            if(
$this->card1['suit'] == $this->card2['suit'] && $this->card2['suit'] == $this->card3['suit'] && $this->card3['suit'] == $this->card4['suit'] && $this->card4['suit'] == $this->card5['suit']) $this->flush true;
             if(
$this->flush){
                 
$this->held "11111";
                 
$this->comb 5;
             }            
        }
        
        function 
checkFH(){
             if(
$this->royalstraightflush) return;
             if(
$this->straightflush) return;
             if(
$this->fourofakind) return;
             
//Pat1: 1+2+3|4+5
             
if($this->card1['card'] == $this->card2['card'] && $this->card2['card'] == $this->card3['card'] && $this->card4['card'] == $this->card5['card']) $this->fullhouse true;
             
//Pat2: 1+2+4|3+5
             
if($this->card1['card'] == $this->card2['card'] && $this->card2['card'] == $this->card4['card'] && $this->card3['card'] == $this->card5['card']) $this->fullhouse true;
             
//Pat3: 1+3+4|2+5
             
if($this->card1['card'] == $this->card3['card'] && $this->card3['card'] == $this->card4['card'] && $this->card2['card'] == $this->card5['card']) $this->fullhouse true;
             
//Pat4: 1+4+5|3+2
             
if($this->card1['card'] == $this->card4['card'] && $this->card4['card'] == $this->card5['card'] && $this->card2['card'] == $this->card3['card']) $this->fullhouse true;
             
//Pat5: 2+3+4|1+5
             
if($this->card2['card'] == $this->card3['card'] && $this->card3['card'] == $this->card4['card'] && $this->card1['card'] == $this->card5['card']) $this->fullhouse true;             
             
//Pat6: 2+3+5|1+4
             
if($this->card2['card'] == $this->card3['card'] && $this->card3['card'] == $this->card5['card'] && $this->card1['card'] == $this->card4['card']) $this->fullhouse true;                          
             
//Pat7: 2+4+5|1+3
             
if($this->card2['card'] == $this->card4['card'] && $this->card4['card'] == $this->card5['card'] && $this->card1['card'] == $this->card3['card']) $this->fullhouse true;                                       
             
//Pat8: 3+4+5|1+2
             
if($this->card3['card'] == $this->card4['card'] && $this->card4['card'] == $this->card5['card'] && $this->card1['card'] == $this->card2['card']) $this->fullhouse true;                                                    
             
//Pat9: 1+4+5|2+3
             
if($this->card1['card'] == $this->card4['card'] && $this->card4['card'] == $this->card5['card'] && $this->card2['card'] == $this->card3['card']) $this->fullhouse true;                                                                 
             
//Pat10: 1+3+5|2+4
             
if($this->card1['card'] == $this->card3['card'] && $this->card3['card'] == $this->card5['card'] && $this->card2['card'] == $this->card4['card']) $this->fullhouse true;                                                                              
             
//Pat11: 1+2+5|3+4
             
if($this->card1['card'] == $this->card2['card'] && $this->card2['card'] == $this->card5['card'] && $this->card3['card'] == $this->card4['card']) $this->fullhouse true;                                                                                           
             if(
$this->fullhouse){
                 
$this->held "11111";
                 
$this->comb 6;
             }
        }
        
        function 
checkFourOfAKind(){
            if(
$this->royalstraightflush) return;
            if(
$this->straightflush) return;
            
//Pat1: 1+2+3+4
            
if($this->card1['card'] == $this->card2['card'] && $this->card2['card'] == $this->card3['card'] && $this->card3['card'] == $this->card4['card']) {
             
$this->fourofakind true;
             
$this->comb 7;
             
$this->held "11110";
            }
            
//Pat2: 1+2+3+5
            
if($this->card1['card'] == $this->card2['card'] && $this->card2['card'] == $this->card3['card'] && $this->card3['card'] == $this->card5['card']) {
                
$this->fourofakind true;            
                
$this->comb 7;
                
$this->held "11101";                
            }
            
//Pat3: 1+2+4+5
            
if($this->card1['card'] == $this->card2['card'] && $this->card2['card'] == $this->card4['card'] && $this->card4['card'] == $this->card5['card']) {
             
$this->fourofakind true;                        
             
$this->comb 7;
             
$this->held "11011";             
            }
            
//Pat4: 1+3+4+5
            
if($this->card1['card'] == $this->card3['card'] && $this->card3['card'] == $this->card4['card'] && $this->card4['card'] == $this->card5['card']) {
             
$this->fourofakind true;                                    
             
$this->comb 7;
             
$this->held "10111";                          
            }
            
//Pat5: 2+3+4+5
            
if($this->card2['card'] == $this->card3['card'] && $this->card3['card'] == $this->card4['card'] && $this->card4['card'] == $this->card5['card']) {
                
$this->fourofakind true;                                                
                
$this->comb 7;
                
$this->held "01111";
            }                             
        }
        
        function 
checkSF(){
            if(
$this->royalstraightflush) return;
            if(
$this->card1['suit'] == $this->card2['suit'] && $this->card2['suit'] == $this->card3['suit'] && $this->card3['suit'] == $this->card4['suit'] && $this->card4['suit'] == $this->card5['suit']){
                
$num1 $this->faceToNum($this->card1['card']);   
                
$num2 $this->faceToNum($this->card2['card']);   
                
$num3 $this->faceToNum($this->card3['card']);   
                
$num4 $this->faceToNum($this->card4['card']);   
                
$num5 $this->faceToNum($this->card5['card']);   
                
$this->straightflush $this->checkStrPattern(array($num1,$num2,$num3,$num4,$num5));
                if(
$this->straightflush){
                    
$this->held "11111";
                    
$this->comb 8;                    
                }
            }
        }
        
        function 
checkRoyalSF(){
            if(
$this->card1['suit'] == $this->card2['suit'] && $this->card2['suit'] == $this->card3['suit'] && $this->card3['suit'] == $this->card4['suit'] && $this->card4['suit'] == $this->card5['suit']){
                
$tfound false;
                
$jfound false;
                
$qfound false;
                
$kfound false;
                
$afound false;
                if(
$this->card1['card'] == "T" || $this->card2['card'] == "T" || $this->card3['card'] == "T" || $this->card4['card'] == "T" || $this->card5['card'] == "T"$tfound true;
                if(
$this->card1['card'] == "J" || $this->card2['card'] == "J" || $this->card3['card'] == "J" || $this->card4['card'] == "J" || $this->card5['card'] == "J"$jfound true;
                if(
$this->card1['card'] == "Q" || $this->card2['card'] == "Q" || $this->card3['card'] == "Q" || $this->card4['card'] == "Q" || $this->card5['card'] == "Q"$qfound true;
                if(
$this->card1['card'] == "K" || $this->card2['card'] == "K" || $this->card3['card'] == "K" || $this->card4['card'] == "K" || $this->card5['card'] == "K"$kfound true;
                if(
$this->card1['card'] == "A" || $this->card2['card'] == "A" || $this->card3['card'] == "A" || $this->card4['card'] == "A" || $this->card5['card'] == "A"$afound true;
                if(
$tfound == true && $jfound == true && $qfound == true && $kfound == true && $afound == true) {
                    
$this->royalstraightflush true;
                    
$this->held "11111";
                    
$this->comb 9;
                }
            }
        }
?>


It calls the class deck; this one:

Code:
      class Deck{
        var 
$pointer 0;
        var 
$deck = array();
        function 
Deck(){
            
        }
        
        function 
shuffleCards(){
            
mt_srand(microtime() * 10000000 rand());
            
$cards = array();
            for(
$l 0$l 52$l++){
                
$cards[] = $l;
            }
            
shuffle($cards);
            
$this->deck $cards;
        }
        
        function 
getFirstHand(){
            
$c1 $this->deck[$this->pointer];
            
$this->pointer++;
            
$c2 $this->deck[$this->pointer];
            
$this->pointer++;
            
$c3 $this->deck[$this->pointer];
            
$this->pointer++;
            
$c4 $this->deck[$this->pointer];
            
$this->pointer++;
            
$c5 $this->deck[$this->pointer];
            
$this->pointer++;
            return array(
$c1,$c2,$c3,$c4,$c5);
        }
        
        function 
getCard(){
            if(
$this->pointer >= 52){
                
$this->shuffleCards();
                
$this->pointer 0;
            } 
            
$c $this->deck[$this->pointer];
            
$this->pointer++;            
            return 
$c;            
        }
        
        function 
getCardByNum($num){
            switch(
$num){
                case 
0: return array("suit" => "h""card" => "A"); break;
                case 
1: return array("suit" => "h""card" => "2"); break;
                case 
2: return array("suit" => "h""card" => "3"); break;
                case 
3: return array("suit" => "h""card" => "4"); break;
                case 
4: return array("suit" => "h""card" => "5"); break;
                case 
5: return array("suit" => "h""card" => "6"); break;
                case 
6: return array("suit" => "h""card" => "7"); break;
                case 
7: return array("suit" => "h""card" => "8"); break;
                case 
8: return array("suit" => "h""card" => "9"); break;
                case 
9: return array("suit" => "h""card" => "T"); break;
                case 
10: return array("suit" => "h""card" => "J"); break;
                case 
11: return array("suit" => "h""card" => "Q"); break;
                case 
12: return array("suit" => "h""card" => "K"); break;
                case 
13: return array("suit" => "d""card" => "A"); break;
                case 
14: return array("suit" => "d""card" => "2"); break;
                case 
15: return array("suit" => "d""card" => "3"); break;
                case 
16: return array("suit" => "d""card" => "4"); break;
                case 
17: return array("suit" => "d""card" => "5"); break;
                case 
18: return array("suit" => "d""card" => "6"); break;
                case 
19: return array("suit" => "d""card" => "7"); break;
                case 
20: return array("suit" => "d""card" => "8"); break;
                case 
21: return array("suit" => "d""card" => "9"); break;
                case 
22: return array("suit" => "d""card" => "T"); break;
                case 
23: return array("suit" => "d""card" => "J"); break;
                case 
24: return array("suit" => "d""card" => "Q"); break;
                case 
25: return array("suit" => "d""card" => "K"); break;
                case 
26: return array("suit" => "c""card" => "A"); break;
                case 
27: return array("suit" => "c""card" => "2"); break;
                case 
28: return array("suit" => "c""card" => "3"); break;
                case 
29: return array("suit" => "c""card" => "4"); break;
                case 
30: return array("suit" => "c""card" => "5"); break;
                case 
31: return array("suit" => "c""card" => "6"); break;
                case 
32: return array("suit" => "c""card" => "7"); break;
                case 
33: return array("suit" => "c""card" => "8"); break;
                case 
34: return array("suit" => "c""card" => "9"); break;
                case 
35: return array("suit" => "c""card" => "T"); break;
                case 
36: return array("suit" => "c""card" => "J"); break;
                case 
37: return array("suit" => "c""card" => "Q"); break;
                case 
38: return array("suit" => "c""card" => "K"); break;
                case 
39: return array("suit" => "s""card" => "A"); break;
                case 
40: return array("suit" => "s""card" => "2"); break;
                case 
41: return array("suit" => "s""card" => "3"); break;
                case 
42: return array("suit" => "s""card" => "4"); break;
                case 
43: return array("suit" => "s""card" => "5"); break;
                case 
44: return array("suit" => "s""card" => "6"); break;
                case 
45: return array("suit" => "s""card" => "7"); break;
                case 
46: return array("suit" => "s""card" => "8"); break;
                case 
47: return array("suit" => "s""card" => "9"); break;
                case 
48: return array("suit" => "s""card" => "T"); break;
                case 
49: return array("suit" => "s""card" => "J"); break;
                case 
50: return array("suit" => "s""card" => "Q"); break;
                case 
51: return array("suit" => "s""card" => "K"); break;
            }
        }
    } 
?>

newbie
Activity: 25
Merit: 0
May 20, 2011, 04:22:58 PM
#3

Great. I have approximately the same skill set.

I'm developing a temporary home for the project at poibella.org/osbcc.

Can we send private messages on this board? I would like to give you my email so we could start working together faster.


hero member
Activity: 536
Merit: 505
+1
May 20, 2011, 01:10:31 PM
#2
Good idea!

I work with python, php, java, mysql...

L.
newbie
Activity: 25
Merit: 0
May 20, 2011, 11:43:43 AM
#1

Hi Everybody,

I've been thinking that an open source casino would be a good idea. Something similar to wordpress but with gambling widgets....

I've started an open source bitcoin casino bulletin board to begin discussing and constructing the project. I would be happy to hear from anyone who's willing to contribute.

Thanks,
TRSH0
Jump to: