I am wanting to create a card game that will have 1 to 7 players plus the dealer. Currently I have 1 player and the dealer. Each player will have a listbox that contains an index for each card in the player's hand. As the cards are dealt each player will be dealt their first card including the dealer, the dealer being last. Then everyone is dealt their second card again the dealer being last. What i need is a way to save the contents of the listbox for each player and when it's that player's turn to recieve another card the repopulate the listbox with the previously saved items and then add the new itemas it is dealt to the player. Could be used in many types of card games.
henryz_box
0
Junior Poster in Training
Recommended Answers
Jump to PostYou could store each player's cards in an array and assign the ListBox DataSource as needed. Here is an example:
Public Class Form1 Private list1() As String Private list2() As String Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load list1 = {"a", "b", "c", "d", …
All 2 Replies
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
henryz_box
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.