Hi all,
I am looking for sample VB.Net codes for deck of cards. Yes, I am looking for a solution.
The question:
" A class modules that will simulate shufling a deck of cards. The class module, when initialized, should create an array to store a deck of 52 playing cards. Create a method named Shuffle to shuffle the deck of cards, as well as another method to deal each card from the deck of cards. The latter method, named DealCard, should deal the next card off the deck. This form should contain a list box that displays each card in the deck after they have been shuffled. Will need a button that, when clicked,will shuffle the deck of cards.
- In the class module, declare an array of structures. This should contain elements, each representing a card in the deck. The structure should have two members: one representing the card (Ace, 2, 3, 4, ...), and a second member representing the suit of the card. In the new procedure, store the cards in the array.
- To shuffle the cards, all the Randomize function to seed the random number genrator. In random order,copy the content of the first array to a second array.
- The DealCard method should deal the cards from the second array".
I am looking for sample codes of deck of cards. Does anyone has codes for this? I would appreciate it. Thank you.
Regena
Enter your message below
Sign in or Join us (it's free).