Two Dimensional Array Poker Game In Visual Basic

Apr 24, 2012

I have finally been stumped this semester in my Visual basic course. Mainly because I have to write a program that is started from something that I have not created. I have to create a program that will take in info from the user, then spit out the poker hand that they are holding. For instance, the user will type in 1 for ace, 2 for 2, 3 for 3......10 for 10, 11 for Jack, and then in the next column type in C for Clubs, S for Spades.. and so on. Here is the code I have been given:

[Code]...

View 5 Replies


ADVERTISEMENT

Video Poker Game Using Visual Studio - Create Classes?

Jun 25, 2009

I am very new to this whole programming thing and I have read several books and many websites but I can't get a good start on creating a video poker game. I understand that I need to create classes, but have no idea how to start. Most of the things I have been reading have been for Visual Basic 6.0 and it appears hard to understand. I am looking for some type of tutorial of how to create the classes I need and how to get the actual information from the classes into my form. Can anyone out there provide me with a good starting point? Is there any good (and easy) code out there to get me started. I feel that if I can get a good starting base, I can learn from there.

View 3 Replies

Visual Basic Value Of Type '1-dimensional Array Of String' Cannot Be Converted To 'String

Aug 27, 2011

Im working on a program and I get this "Value of type '1-dimensional array of String' cannot be converted to 'String'." heres the code that gets this error:

[Code]...

View 3 Replies

Repeat Cards Showing Up In Game And Win Evaluating Code For Poker Game?

Jul 2, 2009

I am working on a poker game and I have the game setup the way I want it in terms of graphics and I have the code programed to deal the cards out exactly how I want them. Granted, the code is very simplistic, but functional for a new programmer like myself. I'm sure there are other more efficient ways to code my game, but I like mine so far because I can at least understand the majority of it. With that being said, here are a few problems and questions that I have.

1. How come when all 12 cards are dealt out I have some cards repeating in the game? For example, I get queen of diamonds in more than one picture box when I only want the card to be dealt once and then removed until the next game.

2. I was hoping to have a button 3 to clear all the boxes, basically resetting the game to the next game. When I hit button 3 it only clears the contents of picturebox 10 and 12.Other notes: I have the deal down the way I want it. It deals the first 10 picture boxes and a second button deals the 11 and 12 picture boxes.

3. I know this is my next step so I want to post it with the code I currently have. I want to start taking my project one step further by evalutating each of the three rows of cards (3 rows of 3 cards each - I'm not worried about the dealers hand (picture box 10, 11, 12 yet). So I want to evaluate a row of pictureboxes against a "pay scale" and display the win in a text box or label next to the 3 card hand. For example, Q of diamonds, Q of Clubs, Q of spades would win 15, etc. ( have a weird feeling I may have to change the names of the cards (I have them named card1, card2, etc. right now) to something that identifies them in order to evaluate the hands.

Here is the code that I currently have. I'm using visual basic.

Public Class Form1
Dim Rndm As New Random
Dim myPB(11) As PictureBox
Dim HiddenCards As New List(Of String)

[code]....

View 1 Replies

Game Programming :: Writing A Video Poker Style Game ?

Apr 1, 2009

I m writing a video poker style game. the form consists of the player's 5 cards, a deal button, a hold button for each card, a button to select amount to play that hand. im using Visual Basic 2008 Express Edition.

View 10 Replies

Game Programming :: Multi-dimensional Array Ordering

Apr 20, 2009

I have a multi-dimensional array storeHand(20,6) which stores 6 ints. The int at point 0 in each array represents a rank. So the array ends up looking like this:

(7, 0, 0, 3, 5, 7)
(6, 2, 3, 0, 6, 5)
(5, 0, 0, 0, 13, 4)
(8, 0, 0, 0, 0, 3)
(2, 0, 0, 0, 0, 1)

I want to re-order the array so that the higher the integer value at position 0 is, the higher it's position will be in the sortedHand(20,6) array. So as above, I'd want sortedHand(20, 6) to look like this at the end:

[Code]...

View 1 Replies

Saving A Game In Visual Basic?

Mar 3, 2012

when the user runs the program for the first time, it will ask for his name. After his name has been entered and he clicks Ok, the main menu comes up. From there he can click Start to begin the first level of the game. After he finishes that level, I want the application to save his progress so it knows what level he last finished. Then when the user decides to quit the application entirely and restart it, I want the application to skip the name dialog and go straight to the main menu since he already has a saved game. Then when he clicks start, it will start off with the last level he finished.

I also added an option in the main menu where the user can reset all his data. So next time the application starts, it will ask for his name as if it was starting up for the first time.

View 6 Replies

Develop A Poker Game?

Oct 14, 2010

I am trying to develop a poker game and I followed the follwoing tutorial -[URL] It works awesome for the logic but I am looking one more functionality to enter the first two cards by the user instead of automatically creating it. I am fairly new to VB coding and this program is too advanced for me to understand.

View 5 Replies

Get Poker Game With Payment?

Jul 6, 2009

Which programming language will be best for big poker game where cash deposition is must?

View 2 Replies

Making A Game In Visual Basic Express 2008 With Several Forms?

Nov 18, 2010

Here is a wierd case - I am making a game in Visual Basic Express 2008 with several forms. Each windows form I've given a quit command that works well to end the game. (Me.Close) However if instead I click on the big X button that windows provides in the upper right hand corner - it does not look to truely stop the program.

I'm running this program in debug mode from the MS VBE editor, but when I click that X it tells me that program is still running even though all

View 5 Replies

Hold A Card In Poker Game?

Jun 11, 2010

Anybody know how to hold a card in poker game?[code]...

View 1 Replies

Poker Game Is Made In Web Form?

Jun 9, 2010

I am making poker game using webform in visual basic?However , i am stuck now. I don't know how to random the cards

[Code]...

View 4 Replies

Using Blackjack Starter Kit For Poker Game?

Jul 7, 2009

I'm sitting here with a print out of the class deck, class hand, and cardgameframework from the blackjack starter kit for visual basic and I'm lost as to where I need to go to use the above mentioned classes. I am looking to create a simple poker game using these classes as a base. I'm not looking for anything fancy, just something functional. Starting off I would like to hit a deal button and have it deal 5 cards into pictureboxes and then give me an option to (mouse click) hold any number from 0 to 5. Once I have clicked the cards to hold, I would like the program to deal new cards into the other pictureboxes. If I could get the program up to that point it would be a great place to start. Can anyone point me in the right direction? Has anyone used the cardgameframework before?

View 1 Replies

Create A Video Poker Card Game Using VB?

Jun 10, 2010

I am looking to create a video poker card game using visual basic.I have limited knowledge of visual basic 8 but was very curious about visual basic 10.

View 4 Replies

VS 2008 - Game Poker Hands Database

Mar 29, 2009

okay, so i'm making a poker game, and i need to determine a winner. what i was thinking, to determine a winner, was to assign each card a number which will identify it. then read all the card identifiers as a whole, and that would identify the hand. i can then use the hand identifier to refer back to something which has all the hands ranked. i think probably and e num would be the better option (simply because it keeps everything in-game) but if something else proves a better option, i'm willing to change.

so basically, i'd like to know if this is a good choice, and if it is, how i'd go about doing it. also, i know there's a way i can automatically create each hand identifier, so any idea's on that would be great.

View 6 Replies

No Control Array In Visual Basic 2005

Apr 22, 2007

OK as far as I know there is no control array in Visual Basic 2005 So how do I do this. I want to change the color of an array of pictureboxes some red some green almost like sending an SOS message. So I already have a string of ones and zero's like 11000110001001100011......these are already in an integer array........ARRAY(40) ......but now I need to transfer this data to an array of pictureBoxes by turning them Red or Green to show the message. I just wanted to place the integer array and the PictureBox array in the same.......

[Code]...

View 6 Replies

VS 2008 Copy One Dimensional Array Into Two Dimensional Array?

Feb 17, 2010

I have a string containing many lines. Each line has many values separated by commas. Basically it's in CSV format. The number of lines is variable but the number of columns is always 7.

I can get each line into a one dimensional array using Split(Var, Chr(10)).

I'd like to make it a two dimensional array where the second dimension contains each comma separated value.

I've got

Dim VarArray1() As String = Split(VarText, Chr(10))
Dim VaryArray2(0 To VarArray1.Length - 1, 0 To 6) As String

Is there a quick way to get the contents of VarArray1 into VarArray2. I know I can do the following.

For Counter = 0 to VarArray1.Length - 1
Dim line as string = VarArray1(Counter)
Dim Values() as string = Split(line, ",")
For Counter2 = 0 to 6
VarArray2(Counter,Counter2) = Values(Counter2)
Next Counter2
Next Counter

But is there a quicker way to do it that doesn't require passing through each element of VarArray1 and then passing through each element of Values.

The eventual goal in all of this will be to find the highest value in the 3rd column (the arrays are strings at this point because not all columns are numeric). To do that once I get the values into VarArray2 I suspect I have to pass through each element VarArray2, i.e. VarArray2(Counter,2). Unless I can copy the whole third column into a SortedList?

View 4 Replies

Declare A Base Case For A 2d Array In Visual Basic?

Nov 23, 2009

give me example of how I would declare a base case for a 2d array in visual basic. I am using 2008 edition

View 19 Replies

Stopping And Starting For Each Loop Array In Visual Basic

Mar 1, 2010

i have a for each loop i.e

[Code]...

if want that the loop stops while the player play a file until finished playback

View 1 Replies

Visual Basic 2010 Creating A Control Array?

Sep 25, 2010

How can I make a control array? Or the equivalent.

I am used to Visual Basic 6 which presents the option of whether to create a control array when I copy and paste and control.

View 6 Replies

Can Array Bounds Checking Be Disabled In Visual Basic 2008

Jan 6, 2010

I know that this was an advanced compiler option in previous versions of Visual Studio, is there a way to disable array bounds checking in Visual Studio 2008? There's no option for it that I can see.

View 1 Replies

Operator '&' Is Not Defined For Types '1-dimensional Array Of Byte' And '1-dimensional Array Of Byte'.

Feb 26, 2012

I have 9 1-dimensional arrays of bytes and 1 of them is empty, I want to make the empty one equal to the others put together like you would a string:

Dim bla As String = "bla" & "bla" & "bla"
'now bla = "blablabla"
but instead:

[Code]......

View 9 Replies

Compare The Value Of Two/multi Column Array And Add Into Listbox Without Duplication In Visual Basic?

May 2, 2012

I've small project to do and now I'm stuck in middle. The program is to read the sequential text file and load it into a array/array of structure.The data information is like this (sample):

ID | Name | Type
1 | Cat | Animal
2 | Dog | Animal

[code]....

This is Just as sample data, my original data is more than this.I've open the DATA.txt file using FileStreamReader:

Dim FileStreamReader As StreamReader = New StreamREader(DATA.txt)

Read all the elements in the list and pass through ReadArrayString.Split the string using:

DataString.Split(New Char() {";"c})

Pass through

ReadArrayString(0)
ReadArrayString(1)
ReadArrayString(2)

Where index 0 is the ID, index 1 is the name, and index 2 is the Type Then I load the types in the dropdown combobox menu from the array with out duplication. Like this:

If TypeComboBox.FindString(ReadArrayString(2)) < 0 Then
TypeComboBox.Items.Add(ReadArrayString(2))
End If

Now When you click TypeComboBox it will show drop down menu with following list only.

Animal
Bird
Fish

After this, when Animal type is selected/clicked from combobox dropdown menu then it should only add the Id and Name of Animal type in the ListBox.Pseudocode may looks like this:

If Animal is selected/clicked from TypeComboBox then
Add Cat into listbox
Add Dog into listbox

[code]....

I've only figure out load items from only one column/array into combobox with out duplication.But can't figure out to compare the value of one column/array with another column/array and load it into listbox. I don't want to hardcode or write matching value inside the code. What I want is use the Array.

View 1 Replies

Visual Basic 2008: Reading From Textfile Into Array And Then Presented In Listbox?

Jan 7, 2012

I've got the following txt file:

[code]...

Now I want that presented in the listbox with the semicolon and it should be aligned per column so that the numbers, the names, the prices and the quantity are exactly aligned per column.If I read the file like this:

[code]...

Then the semicolon is not presented in the listbox and I don't have any alignment per column. As the names of the woods are not equally long the prices and the quantity are not aligned directly below each other...

My questions are:

1) How to add the semicolon in the listbox as seperator of the columns

2) How to align the 4 columns in the listbox (as I have an array Item(3) )

Later on I need to be able to change the quantity (last column) from 0 to > 0 (that's why I have to use an array)

View 6 Replies

Visual Basic Turning Array Integers (x) Into X Amount Of A Single Character

Mar 31, 2012

I have been tasked to create a Visual Basic console script that asks the user 5 times in a row to input a number into an array (sales figures in thousands), Then you display these results as a sort of tally chart.

For example for the data: sales(10,7,12,5,15)
The output would be
2008:++++++++++
2009:+++++++
2010:++++++++++++

[Code]...

how to change the integer value from within the array into a certain number of a single character.

View 2 Replies

Programming Syntax - Searching An Array For A String Matching Input - Visual Basic

Jan 20, 2012

I can't figure out the syntax for searching an array of stored words for a string matching an input string. I understand the pseudocode of it, but I'm tripping up over what variables I need to put where, and how they should be formatted. More than happy to provide more details should anyone request them.

[Code]...

View 1 Replies

Setting Short Function By Setting Poker Game Points?

Aug 23, 2010

I need help and wondering if you can help me to get my first project...it's a hobby and wondering if you can get me code for this so i can see how it does it* Evaluate( ) Prints the evaluation of the hand to the evaluation Label.

o If IsFlush( ), prints "flush; "
o calls SetPipArray( )
o Uses a For Loop to go through pipArray. For each element, uses a Select Case statement to

[code]....

View 9 Replies

Extracting Visual Basic Source Code From Visual Basic EXE?

Jan 24, 2011

How do you extract source code from a VB.NET .EXE file?

View 3 Replies

Create A Tic-tac-toe Game But None Of The Tic-tac-toe Tutorials Use 2 Dimensional Arrays

Mar 14, 2010

I am new to VB, trying to create a tic-tac-toe game but none of the tic-tac-toe tutorials use 2 dimensional arrays. Since tic-tac toe is 3x3 I created 9 buttons and want either an X or an O to appear depending on where the user clicks. I want one set of instructions to handle the multiple buttons. I was told to use Case statements.

This is what I have so far. Not sure how much is right but hopefully it gives you an idea of what I am looking for.

[Code]...

View 20 Replies

Visual Basic Intro Programming Class - Stuck With A "Index Was Outside The Bounds Of The Array"

Aug 1, 2011

I am very basic with this right now and I'm certain there are ways to do this even more simply than the 2D array, however that is what we are working on right now.

[Code]...

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved