Visual Basic Tutorial - Slot Machine Game In this tutorial we will discuss and show how to create a very simple slot machine game using visual studio and visual basic programming language. If you read some of the other Visual Basic we have discussed that visual basic has many different aspects of it one of which is game programming. 3D Developer Studio for Visual Basic 6.02 is a useful software which is added the 3D capabilities to your Microsoft Visual Basic.The Visual Basic community is known to have many people who contribute a lot of time and effort in helping other.
I'm suppose to create a Slot Machine game. The user starts with 100 tokens. With each 'pull', the user loses 1 token and the computer 'spins' three wheels, each consisting of the numbers 1, 2, 3.If all are 1, the user gets 4 tokens; If all are 2, the user gets 8 token; IF all are 3, the user gets 12 tokens. The number of tokens that the user has should display on the form and the result of the spin should be display in a message box. This is my code so far:
I don't know how to keep the count of the number of tokens, and have the messages display when a set of numbers are the same. Can you tell me what I'm missing or what I need to include? I just need HELP!!! (lol)
- 4 Contributors
- forum7 Replies
- 1,067 Views
- 1 Week Discussion Span
- commentLatest PostLatest Postby asarchit65
Recommended Answers
O.K I assume you need to put some of your code into a button event which becomes your pull. In ther you need a counter to count the number of pulls. You also need to initialize your number of tokens as:
Dim number as Integer = 100 which is the …
Well what is the idea of line 7? Maybe you should get rid of it. I thought you want to count the number of puls there consequently my idea of a second counter . In the real world you only get a certain number of pulls.
Jump to PostAll 7 Replies
Simple Visual Basic Game Code
When the same numbers appear on the form, it still says Try Again, how do I get it to say the amount of tokens the user have won?