home *** CD-ROM | disk | FTP | other *** search
- function guessWhoDealer()
- {
- if(Dcard0 + Dcard1 == 21)
- {
- if(Pcard0 + Pcard1 == 21)
- {
- _root.statusMov.play();
- _root.statusMov.statusCopy = "You and Dealer have Blackjack! Push.";
- Sponds(3);
- _root.gotoAndStop("end");
- return undefined;
- }
- if(insurance == true)
- {
- if(Ptotal >= 22)
- {
- _root.statusMov.play();
- _root.statusMov.statusCopy = "Your Bust! Dealer wins.";
- Sponds(1);
- _root.gotoAndStop("end");
- return undefined;
- }
- _root.statusMov.play();
- _root.statusMov.statusCopy = "Dealer has Blackjack! You claim insurance.";
- Sponds(3);
- _root.gotoAndStop("end");
- return undefined;
- }
- _root.statusMov.play();
- _root.statusMov.statusCopy = "Dealer wins with Blackjack!";
- Sponds(1);
- _root.gotoAndStop("end");
- return undefined;
- }
- if(Ptotal >= 22)
- {
- _root.statusMov.play();
- _root.statusMov.statusCopy = "Your Bust! Dealer wins.";
- Sponds(1);
- _root.gotoAndStop("end");
- return undefined;
- }
- if(Dtotal >= 22)
- {
- _root.statusMov.play();
- _root.statusMov.statusCopy = "Dealer Busts. You win $" + currentBet[0] + ".";
- Sponds(2);
- _root.gotoAndStop("end");
- return undefined;
- }
- if(Pcard0 + Pcard1 == 21)
- {
- Cool = Math.floor(currentBet[0] * 1.5);
- _root.statusMov.play();
- _root.statusMov.statusCopy = "Blackjack! You win $" + Cool + "!";
- Sponds(4);
- _root.gotoAndStop("end");
- return undefined;
- }
- if(16 >= Dtotal)
- {
- _root.nextFrame();
- return undefined;
- }
- if(Dtotal == Ptotal)
- {
- _root.statusMov.play();
- _root.statusMov.statusCopy = "Your hand matches Dealers. Push.";
- Sponds(3);
- _root.gotoAndStop("end");
- return undefined;
- }
- if(Ptotal < Dtotal)
- {
- _root.statusMov.play();
- _root.statusMov.statusCopy = "Dealer wins draw with " + Dtotal + ".";
- Sponds(1);
- _root.gotoAndStop("end");
- return undefined;
- }
- _root.statusMov.play();
- _root.statusMov.statusCopy = "You win draw with " + Ptotal + ".";
- Sponds(2);
- _root.gotoAndStop("end");
- }
- function guessWhoPlayer()
- {
- if(Pcard0 + Pcard1 == 21)
- {
- _root.gotoAndPlay("dealer");
- }
- if(Ptotal == 21)
- {
- _root.gotoAndPlay("dealer");
- }
- if(Ptotal >= 22)
- {
- _root.gotoAndPlay("dealer");
- }
- }
-