Need a game in Visual C++

This is a discussion on Need a game in Visual C++ within the Game Programming forums, part of the General Programming Boards category; I am looking for a Poker game (simple 5 card draw) done in Visual C++. I have found blackjack and ...

  1. #1
    Unregistered
    Guest

    Exclamation Need a game in Visual C++

    I am looking for a Poker game (simple 5 card draw) done in Visual C++. I have found blackjack and some others, but nothing for Poker.

    Can anyone help me out ? ? ? ?

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    2

    Question Me Also

    I would also love to see the source for that game!

    If anyone can provide a link or the direct code - I'd be very interested!

  3. #3
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    cmon poker is almost as easy to do as tictactoe.At least have a go at it yourselves. No point just asking for code until you have had a go at it yourself.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    2

    I've done the Tic-Tac-Toe - but don't have a clue where to start with Poker. I can get as far as the shuffle, but am lost after that.

    Really, I've been looking at this for a very long time already just to get this far.

    If you have any assistance to offer - I'd really really appreciate it.

  5. #5
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    ok assuming c++ and console(text only) you could represent a card with a class something like this....
    Code:
    class Card
    {
    private: string Suit;
                 string Value;
    
    public: Card(string S="",string V="Joker"):Suit(S),Value(V) {}
                ~Card() {}
                const string& GetSuit()const {return Suit;}
                const string& GetVal()const {return Value;}
                void SetSuit(const string s) {Suit=s;}
                void SetVal(const string v) {Value=v;}
    };
    now you need a class to represent a pack of cards. In the constructor make an ordered deck of 52 cards.If you want to do this like a poker machine and if the bet exceeds so much then add jokers to the pack then you could make a 54 card deck where the last 2 are jokers. Tell me what sort of poker game you want to do and come back with your attempt at class Pack with member functions Shuffle() and Deal(). shuffle needs to shuffle the pack and deal needs to deal just the top card of the shuffled pack.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  2. using classes
    By krazykrisi in forum C++ Programming
    Replies: 9
    Last Post: 11-22-2006, 10:41 AM
  3. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  4. question about .net to 6.0 change causing errors
    By jverkoey in forum C++ Programming
    Replies: 17
    Last Post: 03-23-2004, 10:45 AM
  5. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 04:49 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21