Marketplace007 Poker Please help me rewrite this poker game C + + code and run it ...? # Include <iostream> # Include <string> # Include <time.h>
using namespace std;
cCard class ( public char address [13] = ('2 ', '3', '4 ', '5', '6 ', '7', '8 ', '9', 'T', 'J', 'Q' 'K', 'A'); enum function [4] = ("S", "H", "D", "C"); getSuit int (); getFace int (); void print (); ) cCard int: getSuit () ( return function; ) cCard int: getFace () ( return address; ) cCard blank:: print () ( std:: <<face court <suit <; )
cDeck class ( public void shuffle (); Char card [13], [4]; void deck ) cDeck empty:: shuffle () ( int face, suit; for (face = 2; face <13; face + +) ( for (suit = 0; 4 <costume costume + +) Card Face [] [address] = NULL; ) ) cDeck empty:: Deck () ( int card, suit, face; int deck [deckSuit] [deckFace]; map = 1; for (suit = 0; <= deckSuit Costume - 1; suit + +) ( for (face = 0; <face = deckFace - 1; face + +) ( Card Deck] function [face] [=; Map + +; ) ) )
cPlayer class ( public chain cPlayer (); printHand void (); void print (); ) cPlayer string:: cPlayer (String name, int set) ( PlayerName = name; Thurs playerStake =; ) cPlayer empty: printHand () ( std:: court <<card <<tab "\" <<card <... ) cPlayer blank:: print () ( court <<name <<"$" <game <<<"\ n"; )
CGAM class ( public addPlayer bool (); void play (); void deal (); cardQuality void (); void print (); ) CGAM bool:: addPlayer (string playerName, int playerStake) ( std:: court <<"Enter your name:"; playerName std:: cin>>; std:: court <<"money nhow \ you have for the game?" playerStake std:: cin>>; ) CGAM blank:: play (int player [] [2], shuffledCard int [] [13]) ( Scard int, sSuit, SFAC, pSuit = 0, PFAC = 0; static int cardStart = 1;
for (Scard cardStart =, <= 4 + Scard cardStart; Scard + +) ( for (sSuit = 0; <sSuit = 3; sSuit + +) ( for (SFAC = 0; <SFAC = 12; SFAC + +) ( if (shuffledCard [sSuit] [SFAC] == Scard) ( player [pSuit] [PFAC] = sSuit; PFAC + +; player [pSuit] [PFAC] = SFAC; PFAC -; pSuit + +;
) ) ) ) Scard cardStart =;
) CGAM empty face (playerHand int [] [2], const char * follows1] [, const char * face1 []) ( int a, b; for (a = 0, a <= 4 a + +) ( b = 0; std:: court <<"% s" <<follows1 [playerH ... b = 1; std:: court <<"% s" <<face1 [playerHand [a] [b]]); ) ) CGAM empty: whatHand (playerHand int [] [2]) (
int x, y; positFace int [5], positSuit [5]; int * = fPtr positFace, * sptr = positSuit; Facepass int = 0; Suitpass int = 0; int right = 0; for (x = 0, x <= 4 x + +) ( y = 1; * FPtr = [playerHand x] [y]; fPtr + +; ) for (x = 0, x <= 4 x + +) ( y = 0; * Sptr = [playerHand x] [y]; sptr + +; )
for (x = 0, x <= 3; x + +) ( for (y = (x + 1) y <= 4, y + +) ( if (* (positFace + x) * == (positFace + y)) ( Facepass + +; ) ) ) for (y = 0, y <= 3, y + +) ( for (x = 0, x <= 3, x + +) ( if ([positFace x]> positFace [x +1]) ( Swap (& a. Posted on April 3, 2010.
CommentsThere are no comments.Leave a Comment | Popular Poker Coach Gambling License Blackjack True Count Blackjack Faceplates Alien Poker Black Jack Gum Video Poker Machine World Poker Store
External Links Inward Beauty Ideal Cosmetics Shaving Bump Dental Superhero Tipsiness.com Somersaults.org Credit Ally Money Mattress Moneymakers Etc Investment Boss Loan Watchers Insurance Fortune
|