The following Visual Basic project contains the source code and Visual Basic examples used for simple slot machine. Created by Marc Burmeister The source code and files included in this project are listed in the project files section, please make sure whether the listed source code meet your needs there. I'm having issues with a homework problem for my CS class. I'm supposed to make a slot machine and I can't get the continue to work, I get that the scanner nextLine method skips over the line and keeps what was there but it won't let me enter anything and it just ends the program.
- Java Slot Machine Program
- Slot Machine Simulation Java Program
- Slot Machine Source Code
- Java To Machine Code
Projects
- a very bad flight simulator
Martin & Lachie's RailscampX project: a one button educational canabalt/jetpack joyride type game using canvas & EaselJS. - achtung die kurve
The HTML5 Canvas version of the old Borland C++ game 'Achtung die Kurve'. - blastEngine
A basic Galaga style canvas game that can be used as a base for bigger and better things.. - CanLaro
Helpers for HTML5 2D Canvas Game Development. - canvas
Experimenting with HTML5 canvas game. - canvas game
HTML5 <canvas> tag game library. - Canvas Pictionary
An attempt at a web sockets / canvas based multi player online pictionary game. - canvas pong
A canvas game for browsers. - canvas td
A fully featured tower defense game built with <canvas>. - canvas typeface.js
fork of typeface.js for use in canvas /js games. - CanvasCapture
An HTML5 Canvas screen capture tool written in JavaScript. Record animations from HTML5 Canvas in realtime. Create videos of HTML5 video games and demos. - CanvasEngine
Framework for HTML5 Canvas oriented 2D video games. - colonial
A canvas based video game where you build a colony in the New World. - cosmos fight
Cosmos Fight is a 2D space shooter game. The game is built using the HTML5 Canvas and written in Javascript. - Dart HTML5 canvas game sample
A little sample of how you can create games with google Dart and interacting with HTML5's canvas. - divers
simple js canvas game for contest on topface.com. - elasticdraw
An HTML5 game that allow user to draw in a <canvas> using elastics. - Game .JS
Javascript game framework using HTML5 Canvas. - game 2d
Game experiments in Canvas. - gamescreen
Library for 2D games/drawing applications using HTML 5 canvas. - hbolo
Remake of the classic bolo game using HTML5 < canvas >. - hitman
pixel perfect collision detection in canvas based html5 games. - HTML5 Canvas Game
My first html5 canvas game , inspired by http://rawkets.com (Permission has been given to release). - HTML5 Game
A HTML5 shooter game made to learn about the Canvas object and javascript. Allows iOS tilt based controls and saves high scores across browser sessions. - Html5 Tetris
A clone of the famous Tetris game using the canvas component. - invaders404
Another custom HTML5 CANVAS 404 error page with the classic game Space Invaders made in JavaScript. - Isometric Game Html5
Isometric Game Programming in HTML 5 Canvas using Cocos2D Javascript. - jaws
Jaws HTML5 canvas javascript 2D Game Framework. - Karma Slots
Simple HTML5/js/canvas slot machine game. - magic2d
a framework for building 2D games using html5 canvas and javascript. - Molecular Zombies
Made a canvas game to try out Raphael. Idea came from an android screensaver Pixel Zombies. - my fab game
A canvas / fab.js ' game ' for my kids. - nfold
Multi player canvas game demo. - Omega500
A JavaScript library for creating 2D canvas based games. - Simple game with HTML5 Canvas
Simple Javascript canvas tutorial sources. - swarms
CS 679 Project 1 Javascript Canvas 2d Game. - tabletop game
Proof of concept for a virtual tabletop in canvas. - thrust2010
HTML5/Canvas game. Classic 'Thrust' with a mouse driven interface. - tinybabygame
a little baby game i wrote in javascript using canvas. - Track and Field
HTML5 Canvas Track and Field game. - Web Game Stub
Simple Web Canvas Game Template. - webgame.js
Basic 2D game framework using HTML5 canvas. - webos canvas invaders
Canvas Invaders is a webOS port of Jason Brown's canvas game.
Home »
Javascript Free Code Download »
Game »
Javascript Free Code Download »
Game »
Conway Game of Life
Game
Game Adventure
Game Box2d
Game Canvas
Game Engine
Game HTML
Game HTML5
Game ImpactJS
Game iPhone
Game jQuery
Game Multiplayer
Game PhoneGap
Game Puzzle
Game RPG
Game SDK
Game Snake
MineCraft
TicTacToe
Hi to everyone here! I'm a newbie! I just wanna ask help from you especially from the administrator regarding my machine problem...
I am asked by my proffesor to create a slot machine program.
This is how it goes..
This is how it goes..
The simulation starts by presenting the player with a menu of how much money to play for the round. The user has 3 options as shown in this sample run.
Welcome to the House of Fun!
Here, everyone is a winner!
Here, everyone is a winner!
You've spent $0 and won $0
How much are you going to play?
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 65
Invalid! Enter again please..
How much are you going to play?
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 65
Invalid! Enter again please..
How much are you going to play?
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 10
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 10
Notice that the program checks whether the player entered correct values or not. If an incorrect value is entered, the program prompts the player to enter again.
If the player enters 10 or 20, the program will randomly generate 3 symbols. The symbols that can be generated are: APPLES, ARCHER, HEARTS, SMILES, or STARS!. However, the 5 symbols mentioned do not appear uniformly. The table that follows summarizes the statistics:
Symbol Chances of Appearing
STARS! appear 10 % of the time
SMILES appear 30 % of the time
HEARTS appear 30 % of the time
ARCHER appear 30 % of the time
APPLES appear 60 % of the time
STARS! appear 10 % of the time
SMILES appear 30 % of the time
HEARTS appear 30 % of the time
ARCHER appear 30 % of the time
APPLES appear 60 % of the time
The player wins money if the 3 generated symbols result to a lucky combination. If a lucky combination is generated, the prize in the 1st Credit is awarded. If the same lucky combination is obtained for the next round, then the 2nd Credit Prize is awarded.
Lucky Combinations
1st Combination
STARS!-STARS!-STARS!
1st Credit: $500
2nd Credit: $1000
STARS!-STARS!-STARS!
1st Credit: $500
2nd Credit: $1000
2nd Combination
SMILES-SMILES-SMILES
1st Credit: $250
2nd Credit: $500
SMILES-SMILES-SMILES
1st Credit: $250
2nd Credit: $500
3rd Combination
HEARTS-HEARTS-HEARTS
1st Credit: $150
2nd Credit: $300
HEARTS-HEARTS-HEARTS
1st Credit: $150
2nd Credit: $300
4th Combination
ARCHER-ARCHER-ARCHER
1st Credit: $100
2nd Credit: $200
ARCHER-ARCHER-ARCHER
1st Credit: $100
2nd Credit: $200
Java Slot Machine Program
5th Combination
any combination of a pair of any symbols except for APPLES
1st Credit: $20
2nd Credit: $40
any combination of a pair of any symbols except for APPLES
1st Credit: $20
2nd Credit: $40
Slot Machine Simulation Java Program
6th Combination
a combination of SMILES, HEARTS and ARCHER
Credit: Especial Event if bet is $10
Credit: Especial Event 2 if bet is $20 Ocean magic slot.
a combination of SMILES, HEARTS and ARCHER
Credit: Especial Event if bet is $10
Credit: Especial Event 2 if bet is $20 Ocean magic slot.
The values above only hold if the user plays for $20. If the user played for only $10, a regular prize of $50 is given for the 1st to 4th combinations, and $10 for the 5th prize. Note that there are no 1st and 2nd credits for $10 games.
The 6th lucky combination gives the player access to a special event. This happens regardless of the user's game mode choice. There are two special events. If the user entered $10 the credit will be the special event 1 and if the user entered $20 the credit will be the special event 2( Actually my teacher said that I have the option to design whatever special the user will encounter.. Lucky creek no deposit bonus codes 2018. since I know how to program ROCK-PAPER_SCISSORS Game and HANG-MAN GAME.. I chose them for my SPECIAL EVENT 1 & 2). If the user wins the special event 1, an award of $150 will be given to the player. If the user wins the especial event 2, an award of $300 will be given.
All unlucky combinations offer $0.
The program should continue to execute until the user chooses to quit (by entering 0).
SAMPLE RUN
Welcome to the House of Fun!
Here, everyone is a winner!
Welcome to the House of Fun!
Here, everyone is a winner!
You've spent $0 and won $0
How much are you going to play?
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 10
How much are you going to play?
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 10
+--------+--------+--------+
| ARCHER | ARCHER | ARCHER |
+--------+--------+--------+
Congratulations! You get $50.
| ARCHER | ARCHER | ARCHER |
+--------+--------+--------+
Congratulations! You get $50.
You've spent $10 and won $50
How much are you going to play?
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 20
+--------+--------+--------+
| STARS! | APPLES | APPLES |
+--------+--------+--------+
Sorry, You get $0.
| STARS! | APPLES | APPLES |
+--------+--------+--------+
Sorry, You get $0.
You've spent $30 and won $50
How much are you going to play?
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 20
How much are you going to play?
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 20
+--------+--------+--------+
| SMILES | HEARTS | SMILES |
+--------+--------+--------+
Congratulations! You get P20.
| SMILES | HEARTS | SMILES |
+--------+--------+--------+
Congratulations! You get P20.
You've spent $50 and won $70
How much are you going to play?
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 0
How much are you going to play?
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 0
You spent a total of $50 and won $70
Thank You for Playing!
Thank You for Playing!
I already know the codes on the first part of the program. I have already tested ran and debugged the first part wherein the menu is displayed.
I mean this part..
Welcome to the House of Fun!
Here, everyone is a winner!
I mean this part..
Welcome to the House of Fun!
Here, everyone is a winner!
You've spent $0 and won $0
How much are you going to play?
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 65
Invalid! Enter again please..
How much are you going to play?
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 65
Invalid! Enter again please..
How much are you going to play?
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 10
$ 10 for regular prize
$ 20 for increased prize value
$ 0 to quit
> 10
Now my problem is on the part of randomizing the symbols to be displayed..
I tried one of this codes..
I tried one of this codes..
Slot Machine Source Code
Fortunately this code worked! But my problem is: 'How am I going to edit the appearances of each symbol?' Like making the symbol 'STARS!' appear 10% of the time and 'APPLES' appear 60% of the time.. is my function: 'getRandomNum()' wrong? Am I going to change it?.. or what..
plss help me... regarding this matter.. I would really appreaciate if you could help me.. Thanks a lot!
plss help me... regarding this matter.. I would really appreaciate if you could help me.. Thanks a lot!
P.S.
You could also send me the source code for my slot machine program.. If you think you know the shortest/ briefest way to code it... then you could send it to me.. if you like :cheesy: .. I Would really really apreciate it! THANKS! :lol:
You could also send me the source code for my slot machine program.. If you think you know the shortest/ briefest way to code it... then you could send it to me.. if you like :cheesy: .. I Would really really apreciate it! THANKS! :lol:
Editedby __avd because:Added [code] tags. For easy readability, always wrap programming code within posts in [code] (code blocks).
- 6 Contributors
- forum9 Replies
- 965 Views
- 5 Years Discussion Span
- commentLatest PostLatest Postby whgeiger
Recommended Answers
easy, give stars a larger numeric range. since apples are hard to get, make them 0 -9, then alot 10-69 for apples. and allow the other in the 30% remaining. any number randomly generated has a greater chance of falling in the larger block then the smaller one. therefor, you …
Jump to PostWell first off 60+30+30+30+10 does not equal 100 so its kind of hard to say that SMILES HEARTS AND ARCHERS happen 30% of the time.
Group them into the 30% and then pick one out of the 3.
This will help with the distibution with APPLES appearing most …
Jump to PostBrief fix! For something posted 6 years ago? Not brief enough..
Java To Machine Code
Jump to PostAll 9 Replies
easy, give stars a larger numeric range. since apples are hard to get, make them 0 -9, then alot 10-69 for apples. and allow the other in the 30% remaining. any number randomly generated has a greater chance of falling in the larger block then the smaller one. therefor, you have just increased there chances of 'getting' that number.
I don't do homework or write code for people, sorry. However; I am willing to aid in any problem you are trying to solve (as long as some genuine effort is put forth). I feal the best way for someone to learn is for them to complete the project on their own merit. (THINK FOR YOUSELF) If they dont wish to learn or do the work they should not have accepted the project or taken the course!