Code For Making A Score On A Game Of Rock, Paper, Scissors On Vb2008
Oct 23, 2009What is the code for making a score on a game of rock, paper, scissors on vb2008 and how do you make sure it works?
View 1 RepliesWhat is the code for making a score on a game of rock, paper, scissors on vb2008 and how do you make sure it works?
View 1 Repliesi'm am doing a rock paper scissors program for a SDD project at school.i need a counter so that the program displays a textbox saying like you win or you loose when either the person or the computer reaches 3. [code] if you want to comment on my multiple if statements don't bother my teacher has already pointed it out.
View 1 RepliesIm new to VB. how do I get to add the score.my code is
[Code]...
I have produced a simple and basic "Rock Paper Scissors" Game using VB6.I have recently decided to adventure more into VB.NET (please don't list reasons stating I should have done sooner )
Okay to the point.Copied my code from my VB6 RPS game so i can see what needs changing and so i can understand the changes in the language.But i am confused on what to do for the old And statements,
e.g.
If Random = 1 And optPaper Then
lblResult.Caption = ("YOU WIN!")
End If
This uses random number generation and if the number = 1 and the user has selected Paper then the label says Win...What should i use instead of And statements or is there something missing?
EDIT: Just scanned over the code again and read the tool tip yet again, should i use booleans?
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]......
I am creating a type of pacman game, I have entered the code for everything else, but I am struggling with the code for the high score,[code]
View 2 RepliesOn programming assignment without having any real experience in vb. I guess I don't understand subroutines that well. When the program runs it never goes to the computer's turn and does not update the users score either. This assignment is already in but would like to know what is going wrong. Using VB 2010, and this is windows application.
Code:
Public Class Form1
Dim Myturn As Integer
Dim Computerturn As Integer
[CODE]...
I currently have a who wants to be a millionaire game that I have made in visual basic 2010. Each question is in its own form. Form1 opens at the start, and question 1 is opened by a button click on Form1. The user has to click on the picture box at the side to show the text for the question each time. If they answer incorrectly, it displays a message box, opens an input box asking for their name, and goes to the form with the high score list, Form17.
Upon opening Form17, I want the scores to load and be displayed in the list box. The high scores are saved in a text file at C: est.txt . Upon clicking menu or end, the high scores are saved to the text file.
Haveing troubles with an assignment. I am writting code that will allow user to enter a score and the program returns a grade based on the score entered. I can get it to work using "IF" statements but want to use code for ranges. My "IF" code is as follows.......
[Code]....
is there any way yo get the score of one player in counter strike? one of the player on the computer. not all the players. i know that when you are looking att server info, then you can see all the player and there scores. is there anyway to replicate that function?
View 14 Replieshow can i save a high score in toolstrip textbox or listbox?
View 7 RepliesI have to use an access DB as a score table and having a few problems.I have the table showing in a data grid fine what i now need to do is find a way of updating it depending on the score someone gets.anyway here is what I have so far and what I want to do is if player scores say 1000 that his/her score then will be put in that place then the others move down....
Code:
Imports System.Data.OleDb
Public Class highScores
' Full path to database must be given if not in Debug/BIN folder
[code]....
the score table opens on a new form and the score is held in a var on form 1 called lol score just a quick edit I have put 2 buttons on the form to load the data in the grid to start with but this will load automaticly and the name will be entered into either a txtbob or an inputbox?
I am creating a point system for a game. What i have right now is that fastest time with highest score gets a higher ranking.
But i can't seem to create this, what i did was to sort the time first from lowest to highest. Then sorted the points from highest to lowest.
Now my problem is, when i display the results. This is what i get.
RANK TIME SCORE
1 0:56 5
2 0:60 4
3 0:37 2
[Code]....
To clarify - I'm building a simple game in visual basic and I'm trying to create a simple file to record and display the "Best Score" from each game. Actually there are four levels in this game (each one is on a different form) - I'm trying to save the best score from each level to display in a separate Game Stats form. Therefore I creating a datatable on one form, but then trying to get all my other forms to access it.
But now I get a new DBNull error message in part of code not of my making - NewGameDataSet.Designer.vb
Error Message = "The value for column 'BestScoreEasy' in table 'GameTable' is DBNull."
Does this mean I need another New Statement somewhere?
I just finished making a Tetris game in VB.NET, and I wanted to add a high score system to the application. So, when a user completes their game, they have the option of submitting it as a high score, which will compare their score against the previous high scores, then place it accordingly. I was thinking of an XML approach of doing this, where the user's name, rank, score, level, and number of lines cleared will be stored in tags. Here is what I thought the XML might resemble:
[Code]...
So the program will have an array to store all the previous scores. It will read through the XML, and copy the the score data into this array. Then, when the time comes to submit a score, it will compare this score against those previous scores, and find the proper position for that score, and then save it into the array. At the end, it will then copy all the score data from this array to the XML, replacing the <Level>, <Lines>, and <User> tags in the process.I am however having trouble implementing this, as I have no experience with XML files and everything I've read has been very confusing.
Have attached the code so far and would like to be able to rotate my car sprite through 360 degrees and have it move in diagonal fashion.
View 19 RepliesHaveing troubles with an assignment. I am writting code that will allow user to enter a score and the program returns a grade based on the score entered. I can get it to work using "IF" statements but want to use code for ranges. My "IF" code is as follows.......
[Code]...
I am writing a noughts and crosses game and I want to be able to keep score everytime each character wins a game, I have written a sub routine to handle this but it seems to count up in 5's and 10's??I have used a global variable like this Dim i As Integer = 1 then declaired that variable in my sub like this i += 1 (I thaught that this would just add 1 everytime X won a game)then used the variable i to add the score to the label control that keeps the score for the character X.My question is, am I using the correct syntax (+=) for the variable.
View 2 RepliesI wants How to print A4 paper in vb.net 2005 code
View 1 RepliesI am having trouble with creating a score keeping mechanic. I am designing a maths game for junior school students.My school teacher taught us a while ago, a way to make a score keeping mechanic via having code looking like this: Dim Score As Integer.
View 4 RepliesI 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]....
I whould like to find the IP address of a game server that sends UDP packets to my PC. Of this server I know the fixed Port number, but not the IP address
I can read the netstat -anp udp data and store them in a text file... but this command don't displais the IP Address and the Port number of the external servers, only lots of asterisks
the question is: how to retrieve this IP address?
I have used "Search" but nothing came out so i making a thread here. I want to make a project with 2 labels and 2 buttons(maybe 1/2 timer/s). The first label should have the time and the second should be 00:00:00 for a stop clock. The 2 buttons should have Start Clock and Stop Clock. But i dont know how to realise that.(I knew how to make the webtime but i have forgotten it already)
View 1 RepliesI'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 RepliesI would like to take print on pre-printed stationery where I need to fixed up my data in very particular place. Also the paper size is 10 inch by width and 6 inch by height and it is continuous paper which need to be take print from dot matrix printer.
View 1 Repliesi've looked up several tutorials on what i should do to create a collision detection, but im not too positive on how to function my ideas and convert them to code.Basically, i'm creating a space invaders like-game that is 2D Mario-themed (sprites used).I am using a panel for my enemies and Mario is being controlled by the movement of arrow keys and space button shoots.The problem is I can not make my bullets collide with the enemies to make them disappear. This piece of code is what i've got so far with the collision detection :
Code:
'*******************************************************************************************************************************************************
' Collision occurs whenever the pctShoot(podoboo) hits any of the enemy
' When blnTrue, both pctShoot and the enemy disappear
[code].....
While I'm at it, i have another question in concern; but this is not really related to collision but:How do you make an object move down automatically using a timer but make it appear randomly?Like any space invader game, the enemies are shooting back at the hero to make it appear more challenging right?(using Visual Basic 2008)
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:
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 Repliesi am suppose to create "a windows form game called Yahtzis which uses five dice and three throws to create a score" .
The problem is that i don't even know how to start it can anyone shed some light.
I'm making my Media Player in VB2008. I got Listbox1 as playlist. Buttons play and stop works, but buttons next and previous don't. What code i need to put for them?
View 4 Replies