I'm pretty much finishing up writing a Playign Card Class in vb.Net at the moment it covers the following functions. I'm after suggestions really of things to add, remember its more of a generic card deck than related to any specific card game.
- Shuffles Deck
- Deals Card and keeps track of which player has which card
(This is useful for games like poker when you need to collect cards off certain players because they have folded)
- Collect Cards
(Collects cards from specific players)
- Simulates a real deck of cards, the deck stays in an order unless you shuffle
- Draws card face
- Draws cards back
Any other things peope can think that would make it a more useful class?
I am attempting to create a card game in VB.NET, although movements have been slow since I am new to VB.NET and Windows programming altogether. I am a Web Programmer trying to get use to some Windows Programming (VB.NET). Since I did code ASP.NET (VB.NET) before it has been a fairly easy transition.
Right now as a test application I am trying to create a game very similar in nature to Euchre. Would this class you provide help and where can I get it?
Well i've not had time to clean it up properly yet, but it could be used for any card game, here is a black game I have made using the class (I know the code is messy I havent had chance to clear it up)
Hey Pino, your ICards class did help me a lot in understanding the usage of cards.
I have one remark on speed of drawing when using your class.
You use GethDCc and ReleasehDC for each and every card-drawing seperatly.
When drawing only a limited number of cards that would be no problem, however in a patience like game (like FreeCells) you could have 2 complete decks on screen (104 cards), in this case this way of dealing with the hDC will consume much time.
I suggest to do the GethDC/ReleasehDC only once for each COMPLETE drawing action.
You're welcome to rate this post!
If your problem is solved, please use the Mark thread as resolved button
Hey Pino, your ICards class did help me a lot in understanding the usage of cards.
I have one remark on speed of drawing when using your class.
You use GethDCc and ReleasehDC for each and every card-drawing seperatly.
When drawing only a limited number of cards that would be no problem, however in a patience like game (like FreeCells) you could have 2 complete decks on screen (104 cards), in this case this way of dealing with the hDC will consume much time.
I suggest to do the GethDC/ReleasehDC only once for each COMPLETE drawing action.
Yea this is a good idea, I think alot of the class could be improved but it did the trick at the time.