iCards Class For Vb .Net-VBForums
Results 1 to 8 of 8

Thread: iCards Class For Vb .Net

  1. #1

    Thread Starter
    Super Moderator
    Join Date
    Dec 2003
    Location
    Manchester, UK
    Posts
    4,787

    iCards Class For Vb .Net

    Ok hey all,

    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?

  2. #2
    New Member
    Join Date
    Aug 2005
    Posts
    1

    Re: iCards Class For Vb .Net

    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?

    Regards,
    Josh

  3. #3

    Thread Starter
    Super Moderator
    Join Date
    Dec 2003
    Location
    Manchester, UK
    Posts
    4,787

    Re: iCards Class For Vb .Net

    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)
    Attached Files Attached Files

  4. #4

    Thread Starter
    Super Moderator
    Join Date
    Dec 2003
    Location
    Manchester, UK
    Posts
    4,787

    Re: iCards Class For Vb .Net

    If you use this code anywhere please make it clear where you found it. I've seen an article on the net and the code looks identical.

  5. #5
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,790

    Re: iCards Class For Vb .Net

    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


    Wait, I'm too old to hurry!

  6. #6

    Thread Starter
    Super Moderator
    Join Date
    Dec 2003
    Location
    Manchester, UK
    Posts
    4,787

    Re: iCards Class For Vb .Net

    Quote Originally Posted by opus
    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.

    Thanks for the feedback!

  7. #7
    Lively Member
    Join Date
    Aug 2008
    Posts
    75

    Re: iCards Class For Vb .Net

    when i extract the zip it tells me im missing cards.dll

    am i missing something?

  8. #8

    Thread Starter
    Super Moderator
    Join Date
    Dec 2003
    Location
    Manchester, UK
    Posts
    4,787

    Re: iCards Class For Vb .Net

    card32.dll was used. Not sure if this ships with new versions of windows (vista etc)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.