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


ADVERTISEMENT

Game Programming :: Make A Matching Card Game In VB 2010 - Show Cards For 10 Secs Then Change Cards To (AppPath & "Cards Ed.png")

Apr 19, 2012

I need to make a matching card game in VB 2010. i have generated my cards but now need to show the cards for 10 secs then change the cards to (AppPath & "Cards ed.png"). then when a user clicks on the card the card will flip over.*How would i set a timer to turn all my cards into*(AppPath & "Cards ed.png") after 10 secsbut still have the values from the array and when i click the cards they flip over (from red card to numbered card)

Code:
Private Sub Place()
Dim Counter As Integer = 1
For Row As Integer = 1 To Int_Grid_Size

[CODE]..........................

View 2 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

Basic Mastermind Game - Don't Want Any Colors To Repeat - Values Still Repeat Sometimes

Feb 17, 2011

I'm trying to make a mastermind game program with visual basic. I started of creating the combination maker for the start of the game. Hoever, in my version i don't want any colors to repeat. I used the random function independently to get numbers from 1 to 6. Each number has a corresponding color. The problem, the values still repeat sometimes.

Here's my code for that part:

Randomize
a = Fix(Rnd * 6) + 1
txtA = a

If a = 1 Then

[CODE]...

View 2 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

Poker Code - To Deal Cards And Compile A String List For Player And Dealer

May 2, 2009

I have code to deal cards and compile a string list for player and dealer. I want to rank the cards for both player and dealer. I dont know how to compare characters in a string or text (which would give me a starting point).

My Code:

View 1 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

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

Making Cards For Card Game?

Mar 11, 2012

I am using Visual studios 2010, And what I am trying to do is make a card game, and I have some ideas for how to put a lot of it together however I am having trouble getting started with making the cards to begin with.So I need something to call to represent the cards with numerical values with ace being 1 and king being 13.

View 4 Replies

2D Platform Game Physics - Game Development | Dream.In.Code?

Mar 11, 2010

I'm trying to make a 2D platform game and I'm pretty inexperienced at programming. I've coded the player to move left and right and jump, but I can't figure out how to prevent multiple jumps while the player is in the air. Anyone know how to do this?

View 8 Replies

Game Of 21 Card Game, Code For Checking Score Is Not Working?

Jan 13, 2012

Check Score: The winner is the one with the highest score less than or equal to 21If both scores(player total and computer total) are over 21, or if both are equal but under 21, the game is declared a draw.

There is something wrong with this line:
If intPlayerCardTotal < intScore And intComputerTotal < intScore Then
MsgBox "Draw"

[code]......

View 6 Replies

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

Game Programming :: Scopa (Disallowing The Use Of Cards Once Used)?

Jan 11, 2009

As the title says i have a deck of Italian Scopa cards (40)and I want to stop them from being delt once they have been used can i do this with an enabled/disabled or should i find a way to move the individual pictureboxes arround to do it

View 2 Replies

Game Programming :: Code For 3 Of A Kind In Yahtzee Game

Apr 18, 2010

im struggling to work out the code for 3 of a kind in my yahtzee game, i think that if i can work this out i can sort my everest of the full house code!

can someone tell me where ive gone astray?

code:

View 8 Replies

Game Programming :: Snake Game - Get The Code To Get Longer

Jun 6, 2011

I just finished my own snake game, and I need some recommendations on how to make this game better.If you see a problem, please tell me.The only problem with this game is that I can't get the code to get longer, other then that its good.EDIT: Sorry I meant : The only problem with this game is that I can't get the SNAKE to get longer, other then that its good.

View 4 Replies

Game Programming :: Program Is Designed To Generate A Random Hand Of Cards Out Of Our List?

Aug 19, 2008

Below is the code that we have been working on. We have bolded the parts which we are unsure about - they are producing errors. (its near the bottom)The program is designed to generate a random hand of cards out of our list of them. This program is a smaller version of what we hope to have in the full one - ie. It tries to get a random hand of 3 cards out of a possible 5.

The part we are having errors with is getting the images to display on each of the 3 'picturebox' objects using a loop (so we don't have to type each picturebox individually).

[Code]...

View 8 Replies

VS 2008 : Evaluating A Poker Hand?

Apr 8, 2009

We are working on a poker game as a class project. My part is to evaluate and then determine the value of a players hand. We are evaluating from highest to lowest (ie. determining whether the player has a straight flush, 4 of a kind, full house, flush and then going all the way down to a high card only "worthless hand"). My part is evaluating the 2 pair, 1 pair, and nothing hands. The hand will be a two-dimensional array with the row(0 thru 12),column (0) containing the numeric "face" value of the cards and the column(1) containing the value assigned to the suite (1=clubs, 2=diamonds,3=hearts,4=spades). I have NO IDEA where to even begin this evaluating procedure.

View 4 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

Concentration Game VB With PictureBox Showing Pictures

Mar 15, 2012

The project: As one of the projects for my Advanced Visual Basic course, I'm implementing a Concentration game very much like this project:(url)

The issue: I've got most of the logic working but I'm getting really weird behavior when I flip the cards. The first one flips fine. The second one is *supposed* to flip and hold for a second (I use a Thread.Threading.sleep(1000)) then flip back to covered if they're not a match.

For some reason, if they don't match it never flips the second card over so that you can see the picture underneath. It evaluates correctly but if the pics don't match, you never get to see the 2nd card.

Secondary issue (not as critical): At lines 67-79 there are some bits of code that are commented out. I'm trying to use a For Each loop to go through all my picture box controls and assign them to the array of structures and then assign the cover image without having to do it one at a time. It would save me about 250 lines of code and help me to still respect myself in the morning.

In addition to including my code, I will upload a copy of the entire project folder in case anyone wants to compile it and see the behavior for themselves.[code...]

View 6 Replies

Game Programming :: Make A Game In VB In Which Character Can Move Around, Jump, And Kill Things?

Apr 2, 2008

im trying to make a game in visual basic in which your character can move around, jump, and kill things. I can get the picture box with the character to move and everything is fine. but i did run into one problem. when the character moves over a tree (or something) you can see the gray backround of the character as i made in paint. how do i make the backround of the picturebox transparent?

View 4 Replies

VS 2010 Game Multi-Client - Program That Enables A Game To Have More Than One Instance Running

Nov 18, 2011

I want to make a program that enables a game to have more than one instance running, where it would otherwise be unable to be done. How should I go about this? A sandbox? Hack?

View 3 Replies

Game Programming :: Adding Score To Rock Paper Scissor Game?

Oct 3, 2011

Im new to VB. how do I get to add the score.my code is

[Code]...

View 6 Replies

Game Programming :: Prevent Users Typing In Random Letters In A Text Box-Scrabble Game?

May 4, 2011

I have created a scrabble game that generates random letters. For the user to type in a word using the random letters they have to type it in a text box.

I want my program to prevent users from typing in letters that are not provided in the text box and to allow them to type in the random letters that are provided.

View 4 Replies

Game Programming :: Spinning Reel - Fruit Machine Game For Windows Mobile Device

Feb 16, 2011

I'm trying to make a simple fruit machine game for windows mobile device.

I can create the game easily enough and flip through pictures in a picture box to display the correct symbol.. but what I'd like to do is do a proper spinning reel, but have no idea where to even start.

What I have is a list of images in an imagelist (or individual files) - what I'd like is them attached to each other and moving downwards, preferably as though it were going around a drum but just them moving would be a start.

View 7 Replies

Game Programming :: Transparant Images - Make A Game Which Basiclly Lets You Shoot Ducks

Feb 1, 2010

I am trying to make a game which basiclly lets you shoot ducks. i have a picture as a background (set as form image) i then have picturebox's with ducks flying flying around you shoot them the disapear etc.

My problem is the image. i have a picture of a duck and a blue square round it. and i would liketo make it transparant because birds dont fly with blue squares.

Below is an image to illistrate my problem

I have tried adding transparent background, transparant key etc

View 2 Replies







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