Write some Software

Completado Publicado hace 7 años Pagado a la entrega
Completado Pagado a la entrega

I would like some very simple code to be written.

This is a "bar betting game" arranged from a traditional "Going to Boston" version. You will play with a computer. At the beginning, you and computer have the initial allowance of $1,000 each, and the game will continue until one becomes broke...

On one turn, you and computer roll three dice and show the two numbers of them but one die number being hidden. Based on the odds you think of, you will bet $1 to $10. The outcome is called "Big Fish!" if the three numbers are identical such as 1-1-1 and 2-2-2.

If not Big Fish, set aside the highest die and re-roll the other two. Keep the highest die of the two and re-roll the last. The total of all three dice is scored, and the bet amount multiplied by the difference of yours and computer's will be added/subtracted to each allowance. If Big Fish, the bet amount will be multiplied by 50 and added/subtracted.

If both the human and computer have the same sum, you should ouput the message "Tied" and print out unchanged money holdings (allowance) on hand for you and the computer. And then, for you and the computer, both should have a new set of three die values.

The same thing applies if both the human and computer both get a "Big Fish". Regardless of their sums, it is a tie. You should print out "Tied" and for both print out the Big Fish message.

You should exactly duplicate all prompts and output messages.

Do not make up your own message strings. Do not roll the dice (generate random values) before you need them. If someone got a "Big Fish" that player only needs three random numbers for a round. Also do not use arrays, vector or any other container class For determining the maximum die value, I want you to use multiple "if" statements. Do not use the max function.

See the below example of a game session:

[Round 1] You rolled (2, 2, ?), machine rolled (4, 6, ?)...

How much are you going to bet: 10

You had (2, 2, 2) ... Big Fish!!!

Machine had (4, 6, 3)

-> Machine rolled (2 ,4) and then rolled (5) -> Machine scored 15.

You won :) You have $1500, machine has $500...

[Round 2] You rolled (2, 5, ?), machine rolled (5, 1, ?)...

How much are you going to bet: 12

- your bet must between $1 and $10, type again: 4

You had (2, 5, 6)-> You rolled (3 ,5) and then rolled (3) -> You scored 14.

Machine had (5, 1, 1)-> Machine rolled (4 ,4) and then rolled (3) -> Machine scored 12.

You won :) You have $1508, machine has $492...

[Round 3] You rolled (2, 1, ?), machine rolled (6, 1, ?)...

How much are you going to bet: 2

You had (2, 1, 1)-> You rolled (5 ,6) and then rolled (4) -> You scored 12.

Machine had (6, 1, 6)-> Machine rolled (6 ,5) and then rolled (3) -> Machine scored 15.

You lost :( You have $1502, machine has $498...

[Round 4] You rolled (2, 1, ?), machine rolled (6, 3, ?)...

How much are you going to bet: 4

You had (2, 1, 4)-> You rolled (5 ,4) and then rolled (4) -> You scored 13.

Machine had (6, 3, 3)-> Machine rolled (6 ,2) and then rolled (6) -> Machine scored 18.

You lost :( You have $1482, machine has $518...

Programación en C++

Nº del proyecto: #13234752

Sobre el proyecto

4 propuestas Proyecto remoto Activo hace 7 años

Adjudicado a:

Nawaz091993

Greetings! I am an expert C++ programmer and I excel in completing such college assigments with 100% correctness. Looking forward to hear from you!

$25 USD en 1 día
(17 comentarios)
3.8

4 freelancers están ofertando un promedio de $26 por este trabajo

urmate

HI Contact me for an efficient, perfect, well documented development of your project according to 100% accuracy and requirements, with dedicated support. Thanks Farah Saif

$30 USD en 1 día
(145 comentarios)
5.9