Bitcoin Forum
May 24, 2024, 12:51:23 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 ... 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 [105] 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 »
2081  Economy / Marketplace / mTBCasino - 9 mBTC bonus on: May 22, 2011, 06:32:29 PM
Here's the first bonus of miliBicoin Casino!

To claim it you need to either be logged in or register, then enter the following address:

http://www.mbtcasino.com/index.php?p=bonus&code=MBTC

You'll be credited 9 mBTC

The advantage of this bonus is that you really will have to play with it, as the minimum withdrawal is 0.01 BTC (or 10 mBTC). So I'm expecting to not have the same outcome as with the BitYacht bonuses.  Wink

Bonus available: 50

Hope you enjoy your time playing at mBTCasino. Games are now the same as BitYacht.
2082  Economy / Marketplace / Re: BitYacht - Now also with slot machines on: May 22, 2011, 06:05:53 PM
I'm not sure what you mean. All I'm asking is, if I "Play for Fun", do I have the same odds of winning as if I "Play for Real"ed?

I guess I finally understand what you mean, as I came across a casino software suit with a brochure saying:

Quote
«Lure your customers into deposit by let them play with our free play mode designed to make them feel they're lucky»

And the answer is no, my system has no such rig, the algorithms on both free and real play are exactly the same (I'd already see some folks losing the 100 Free chips quite fast... maybe I should implement a rig like that one of that casino software, but I really don't like rigged games, so to this one also the answer is: No I won't.)

Still I was thinking of your question that because you were winning on Free Play mode, you would still win at Real Play. That one I can't tell... you could be winning at free and lose at real / lose at free and win at real / win on both / lose on both... I don't know, don't have a "make lose"/"make win" switch.
2083  Economy / Marketplace / Re: Introducing Cardwars on: May 22, 2011, 05:27:42 PM
Based on, yes.
But battles are quite different, as the battle cards are burnt being only the last one played, with advantage to player (on re-tie, the player wins).

http://en.wikipedia.org/wiki/Casino_war
2084  Economy / Marketplace / Introducing Cardwars on: May 22, 2011, 03:05:26 PM
Just added a new table game to the site, it's name is "Cardwars", you can find it near Blackjack at www.bityacht.com (Casino)

Rules of Cardwars:

Cardwars is the simplest table card game of a casino. Dealer gives you a card, takes a card himself and the one with bigger card face wins - suit doesn't matter.
Card values from higher to lower are: Ace - King - Queen - Jack - Ten - 9 - 8 - 7 - 6 - 5 - 4 - 2

If both have a card with the same value then the player must choose if he surrenders or goes to war.

Surrender:
The player gets back 50% of his ante

War:
The player adds a bet of equal value to his ante (if the player's ante was 0.1, the bet will be 0.1 also)
3 cards are burnt by the dealer, the 4th card goes to the player, 5th to the dealer.
Again the one with the higher card wins.
If card values are equal player wins.

Tie bet:

In the middle there's a red circle to bet for tie. Tie pays 10:1. A tie is won if the dealer and the player have cards of same value, regardless if the player choose to surrender or to war.

Here's a screenshot:

2085  Other / Off-topic / Re: The Rapture on: May 22, 2011, 11:06:36 AM
Here we are:

http://www.youtube.com/watch?v=f9KlMWzKj4s&feature=player_embedded

 Grin
2086  Other / Off-topic / Re: Crackpot Armageddon Championship on: May 22, 2011, 11:05:54 AM
Actually you can't blame God of anything. It's God's most funny feature.
"God" operates like a company with 2 managers:

If everything went well you thank God
If it doesn't you blame the Devil

And this system is so freaking perfect that sometimes when one thing is good for one but bad for another, that one will thank God and the other will blame Devil...

But still, yep, why blame (or thank) "God" when himself is an invention of man?
2087  Other / Off-topic / Re: Crackpot Armageddon Championship on: May 22, 2011, 01:07:55 AM
With an outstanding score of 100% prediction FAILS, meet Harold «the Armageddon Crackpot» Camping.  Grin
Still 5 or 6 fails behind Jehovah Witnesses, but looking good.

Atlas,

Sorry if it ruined your plans to become a fundamentalist.

Maybe this one would be a good motto to change that saying in dollar bills, clearly God ain't to be trusted. Poor Harold trusted him and ended up mocked (once more).
2088  Economy / Marketplace / Re: Open Source Bitcoin Casino on: May 21, 2011, 10:33:15 PM
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:
<?php
    
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:
<?php 
      
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;
            }
        }
    } 
?>

2089  Other / Off-topic / Re: Domain Name Squatting on: May 21, 2011, 10:01:21 PM
The only kind of "squatting" I've to complaint about is when I came up with some new idea, browse for the domain and, a few weeks or days later when I decide to register it find some squatter already filled the place with a simple ad site.

Never come to realize if it is just my luck, conspiracy theory, or whatever... but looks like someone is watching whois look ups to register ahead domains that may be usable...
2090  Economy / Marketplace / Re: Bitcoin goods/services need to be more accessible on: May 21, 2011, 08:43:01 PM
Well, somebody (with PHP skills at least) want co-op in finish a project I've somewhat "hanging around" for about a month?
It's called bcommerce and it's an ebay-like site able to buy and sell (you can actually create an ad to sell carrots or an ad to buy carrots).

If nobody is on, well... wait one more month or so and I'll be on it again.
2091  Economy / Marketplace / VideoPoker added to BitYacht on: May 21, 2011, 07:05:10 PM
Well... one more game done to my Bitcoin casino. Hope you enjoy video poker.  Smiley

Variant is All American (Jacks or High, no Wild)
Coin size ranges from 0.01 BTC to 0.20 / Bets 1 to 5 coins

URL: http://www.bityacht.com/index.php?p=slots

(bellow the blackjack)
2092  Economy / Economics / Re: Value of bitcoin denominated shares will eventually approach 0? on: May 21, 2011, 04:18:40 PM
Well, you've a "terrible flaw" here:

Quote
Shareholders of company A start selling their stock to buy from company B

If BTC has double the price then, unless company A still produces 50 BTC anyway, its shares will be down to 0.5. So investors in A wouldn't gain anything on the rally over B, and most likely would loose a lot, as within the selling rally the price would keep dropping at a fast pace.
2093  Other / Off-topic / Re: Today: Global March for Marijuana on: May 21, 2011, 01:24:06 AM
I hear that Brazilian Real, Russian Rubles, Japanese Yens, India Rupiahs along with <put the currency here> are also used by them  Grin
2094  Other / Off-topic / [DRAFT] - Building a new e-Currency on: May 20, 2011, 09:22:28 PM
For starters this is a draft, no I'll not start any project, at least just yet, it's meant to discuss ideas.

Following bitcoin motto, but not forking bitcoin - means a totally different project - what can we think about remove bitcoins nags such as:

* Removing IRC from the scenario - it's both: outdated and a weakness
* Removing the block chain - it's a huge nag, it allows eavesdropping within transactions, unless people start to use BTC on its primary function; Commerce; and it generates transactions enough for people to "hide in the mob" I bet some folks keep their eyes on the block chain, some for so long that can already enumerate the nicks of the payer and payee just by looking at the hash.

?

For my very drafty idea we could come up with a system that would work with server/client system, being the coins generated based not on hardware effort (energy should be preserved) but on server dedication. This would mean only those running servers would be able to generate coins clients would do what clients normally do... spend and use them.
Generating these coins would go through a different process and at small amounts at the time.
Each generated coin would need them to be recognized by a significant amount of servers in order to be valid.
Each transaction should be present only until it's validated by a necessary amount of servers, being forget afterwards (this would mean sort of a dynamic block chain).
And now... I came across the first nag I don't know how to solve; being it opensource I wouldn't be surprised if some server owners in a system like this wouldn't start to log the transactions... making them able to track coins just like the block chain does...
2095  Other / Politics & Society / Re: a question for left-liberals on: May 20, 2011, 08:22:05 PM
Sure, it's an one time service.
However when you hire someone is at either he retires, or got dismissed/fired.

Removing barriers would cause an economic catastrophe due to domino effect. Like bitcoin2cash said early that if he underpays his employees he will "spend more wisely and not on burning cigarettes"... One of the core things that make capitalism efficient is exactly diversification and decentralization, you everybody to consume whatever they want and therefore keep the money flowing.
Let's say all bosses are more up to Pepsi, what would be of Coke then? And who will buy houses? Get a loan in a "MtGox-like labor market"? (means heavily inflated and deflated) It doesn't work that way.

If sometimes (if left alone quite always) many people will try to wage as more as he can, it takes some enforcement to not let the system hang over a single persons' greed - actually such person will "hurt himself" at medium term, but as people lacks wide-view and tend to consider only direct wage vs direct expenses nobody will even think about it.

Sorry folks! You keep talking about "violence" as if it was a linear one-kind only thing. The violence you normally refer is to brutality, but let people starve is a form of violence, exploit people is a form of violence, coerce by economic means is a form of violence...
2096  Other / Politics & Society / Re: a question for left-liberals on: May 20, 2011, 07:43:15 PM
"Boss and employee" are NOT traders, if you want to find a valid analogy, try marriage.

Unless the employee is just there for a single task in a short time, but for such we use to hire a contractor. You don't "employ" a plumber to fix your bathroom, just contract him.
2097  Other / Off-topic / Re: Crackpot Armageddon Championship on: May 20, 2011, 04:28:40 PM
That's cool, so we could hang around with other folks in Hell and that fundamentalist will spent eternity in pure loneliness... Heaven must be a really boring place!

You know... I tend to agree with Cathars, there's no hell, because we're already on it.
2098  Other / Off-topic / Crackpot Armageddon Championship on: May 20, 2011, 04:12:45 PM
Well... looks like some folks are betting tomorrow to be the "Judgment Day". It's an old team in this crackpot championship, with its last prediction to be 6th September 1994. Ahhhh! They missed! But here they're again.
Will they aim to challenge the uncontested champion of this crackpot championship, the Jehovah Witnesses (which counts already with 5+ Armageddon announcements - with a perfect score: 100% fails)?  Grin

http://newsfeed.time.com/2011/01/03/judgment-day-will-may-21-2011-be-the-end-of-the-world/
2099  Other / Politics & Society / Re: a question for left-liberals on: May 20, 2011, 03:49:13 PM
Hardly "minimum wage" is to "pay more", taken it's already "minimum".
Still, if you want to give away your "boss-rights" to bargain for "employee-rights", it's another sort of deal.

I can believe to be fair an arrangement like; you can publish how much I pay you on your FB page, or wherever you want. You can apply your skills and knowledge acquired during performing your duties to me wherever you want, you can show of to work when you please and I pay you 50% or less of minimum hourly wage (when you show up... of course).
But NOT fair if the employer party still wants to keep its "rights" untouched.

And yes, mostly jobs are "I own you" - just not 24 hours/day, but during work period.
2100  Other / Archival / Re: Silk Road: anonymous marketplace. Feedback requested :) on: May 20, 2011, 02:06:50 PM
From TorDir:

Last check unix timestamp: 1305832581
Last status: On
Delay: 80 seconds
Successful checks: 85
Failure checks: 109
Pages: « 1 ... 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 [105] 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!