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 ? ? ? ?
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 ? ? ? ?
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!
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
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.
ok assuming c++ and console(text only) you could represent a card with a class something like this....
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.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;} };
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