Results 1 to 2 of 2

Thread: Card game help needed [Resolved]

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2003
    Posts
    127

    Unhappy Card game help needed [Resolved]

    I'm toying around with a numbers based card game I am making and I have hit a brick wall. Being kinda new to .NET isn't helping any either. Here's the plot for the settings of the game.

    I have TextBox1, 2, 3, 4 and 5 that are inputs. 1 is for number of players, 2 is for the number of cards to be dealt each player, 3 & 4 are lowest & highest range of the face value of the cards that only use numbers ex: 02, 06, 08, 10, TextBox5 is the multiline output for the players and cards. In theory when the inputs have their variables entered they will be the controling factors for the program.


    Dim Ione = TextBox1.Text
    Dim Itwo = TextBox2.Text
    Dim Ithree = TextBox3.Text
    Dim Ifour = TextBox4.Text
    Dim Ifive = TextBox5.Text

    Dim r As New System.Random()
    Dim Ifive = r.Next(Ithree, Ifour + 1)


    Problem 1. Dynamically adding the number of players by the number input into Ione -each player is then represented by a diffrent row in Ifive since multiline is True. I havent been
    able to come up with anything that will let me do this at all.


    Problem 2. Same type of issue with Problem 1 above. The number of cards dealt to each player tells each row of Ifive how many individual cards it needs to contain and that each
    card should be represented by a seperator with a specific format [the number] ex: bad visual output below.


    Problem 3. Incorperate Ithree and Ifour into the calculation to randomly pick numbers from the range that become the cards selected to be given to each player.

    In the below example:

    Ione had the number 3 typed in for three players "three rows"
    Itwo had the number 5 typed in for five cards dealt to each player "row 1, row 2 and row 3"
    Ithree had the number 2 typed in for the lowest card value that could be dealt to each player
    Ifour had the number 20 typed in for the highest card value that could be dealt

    When Button1 is pressed it will tell Ione to create the three rows in Ifive, it will tell Itwo to tell each row in Ifive that they will be dealt 5 cards, Ithree and Ifour will tell each card what the face value will be. The output in Ifive should look something like this bad visual. All this should happen all at the same time with the one button clicked.


    [02] [05] [07] [09] [10]
    [04] [09] [11] [15] [20]
    [08] [02] [16] [05] [18]


    Eventually I will work with PrintDocument to print out the information for the number of players, cards they were dealt and who won. That's on the back burner till I can get this thing going. Now, is there anyone brave enough to either point me in the direction of combining all this information or better yet.... help me with code snippets that can get me started.

    Thanks in advance to the brave that do end up helping me

    Last edited by teamdad; Jun 13th, 2004 at 08:19 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width