hi i am a data structures student,
i have to make a poker game in C++. i know how to do it in OOP but i want to make this game using data structures. Does anyone have an idea what data structures can be used in a poker game?? please help ASAP
Pokerusing data structures
Page 1 of 1
3 Replies - 1587 Views - Last Post: 29 November 2010 - 11:06 AM
Replies To: Poker
#2
Re: Poker
Posted 28 November 2010 - 11:31 PM
You could use a Deque for the deck of cards, and a list or vector for the hand.
#3
Re: Poker
Posted 29 November 2010 - 06:49 AM
Start with a card class. Then a deck class, which is good as a public stack implementation; you deal off of it. Hands are just vectors of card, similar to desk, but you don't need to shuffle them and probably need to figure out their value and maybe even sort them in some way.
This is a very common project and lends itself cleanly to OOP. Show your code, we'll go from there.
This is a very common project and lends itself cleanly to OOP. Show your code, we'll go from there.
#4
Re: Poker
Posted 29 November 2010 - 11:06 AM
Data structures is just a focused, optimized version of OOP, not something completely different
. Write or draw out the program's allocation of memory before you start coding, ans try to use as few loops as possible for starters.
If you need specific help with optimization, run in to an error, or just want the community to review your work, we can, but we'll need to see your code. Have fun!
If you need specific help with optimization, run in to an error, or just want the community to review your work, we can, but we'll need to see your code. Have fun!
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote









|