Sedang Disiapkan

219167 Roulette Game C++ Codes

I need a Roulette Game codes in C++ for my course, here are details of the project. I need a codes ASAP. It will be 2 modes in a game T(Test mode) & G(Game mode).Attached is also the sample of codes, PLEASE NOTE IT'S NOT THE COMPLETE CODES/PROGRAM, I got this from my teacher as a example codes. You can use the codes but need to complete the whole project.

Write a program that simulates a roulette table. The roulette

table has 36 numbers (1-36) that are arranged in three columns of 12

rows. The first row has the numbers 1 through 3, the second row

contains 4 through 6, and so on. The number 0 is outside the table of

numbers. The numbers in the table are colored red and black (0 is

green). The red numbers are 1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25,27, 30, 32, 34, and 36. The other half of the numbers are black.

In a simplified set of rules, players can bet on an individual

number (including 0), the red numbers, the black numbers, the even

numbers, the odd numbers, the numbers 1-18, the numbers 19-36,

any of the columns or rows in the table, two adjacent numbers, two

rows, the corners, and on a dozen (1-12, 13-24, 25-36). The user

should be allowed to enter one of the bets, and the application should use rand() method as the basis for computing the number that

would be rolled on the wheel. It should then compare this number to

the bet, and report whether it won or lost.

The application should also allow the user to enter an initial amount of money into an account. In addition to placing a bet, the user should be able to specify an amount to go with the bet; this amount should be deducted from the account. Any winnings should be

added to the account. The current winnings or losses (difference from the original amount)should be displayed as well as the value of the account. The user should not be allowed to bet more than the total in the account, and only allowed to bet in 5 dollar increments.

Winnings are computed as follows:

Simple bet Payout

Straight Up (Single Number) 35 to 1

Split Bet (2 adjacent numbers- vert/horz) 17 to 1

Street Bet (Row) 11 to 1

Corner Bet (Block of 4 numbers) 8 to 1

Line Bet (Two adjacent rows) 5 to 1

Column Bet (Vertical line) 2 to 1

Dozen Bet (1-12, 13-24, 25-36) 2 to 1

Color Bet (Red/Black) 1 to 1

Even/Odd Bet 1 to 1

Low/High Bet (1-18/19-36) 1 to 1

Note: The number 0 only counts as a number bet.

Finally, the program terminates by prompting the user to quit the game.

Implement a menu with two options representing different modes for establishing the number. The first option is the test mode‐ a test mode is required so the program can be graded. In test mode, the user enters both numbers. This will allow you to test your logic,

results, etc. The second option is game mode. In this mode, the program will randomly generate the number and the user can bet (guess) at the number.

You must use the following three functions (pass parameters):

• Use makeABet -function asks the user what type of bet he'd like to place (number,odd/even, etc)

• Use spinTheWheel –function uses the random number generator to simulate the wheel spin.

• Use figureWinnings –function returns how much money the person has won/lost.

Sample Output (2 runs): G Mode

Enter starting money amount: 1000

Player starts with 1000 dollars

How much to bet? 50 dollars

Enter the type of bet: 1

1. Single Number

2. Adjacent Numbers

3. Row

4. Corner

5. 2 Rows

6. Column

7. Dozen

8. Color

9. Even/Odd

[url removed, login to view]

Enter the number to bet on: 30

The computer rolled: 14

You loose.

Player has 950 dollars.

Play again (Y/N)? y

Player has 950 dollars.

How much to bet? 400 dollars

Enter the type of bet: 6

1. Single Number

2. Adjacent Numbers

3. Row

4. Corner

5. 2 Rows

6. Column

7. Dozen

8. Color

9. Even/Odd

[url removed, login to view]

Enter the number to bet on: 23

The computer rolled: 2

You win!

Player has 1350 dollars.

Play again (Y/N)? N

Thanks for playing

Submission:

Submit your program as [url removed, login to view]

Kemahiran: Semua Boleh, Pengaturcaraan C

Lihat lebih lanjut: roulette program, roulette game, roulette functions, roulette project, roulette game program, write roulette program, program roulette game, roulette numbers, cpp roulette program, program simulate roulette, codes roulette wheel, roulette simple program, write roulette game program, roulette table program, wheel well, function computer programming, starting programming, starting game programming, simple computer programming, random number cpp, random function cpp, random cpp, rand programming, programming cpp, programming simplified

Tentang Majikan:
( 1 ulasan ) dallas, United States

ID Projek: #1965400

Dianugerahkan kepada:

pistart

Ready to work

$50 USD dalam sehari
(0 Ulasan)
0.0