Need help with a c++ project. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Need help with a c++ project.

I'm trying to make a Liar's dice game. The user enters the number of players (minimum of 2 and no max) and each player gets 5 dice. How can I make a player class that will show one player at a time their dice? So if there is 3 players, player 1s dice will be shown first and then they can enter a bid before it moves on to player 2.

3rd Feb 2020, 2:59 PM
Ryan
Ryan - avatar
3 Answers
+ 5
Show your current attempts before we help you
3rd Feb 2020, 3:29 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
0
The code is written on my computer and I don't see a way to upload a picture. Basically, I call a function to ask for the number of players and then store it in int numPlayer. My next function rolls 6 dice for each player and prints the players number and the 5 numbers they rolled. I need to figure out how to do this one player at a time and give them a chance to enter a bid. Then at the end of the program I need to display all of the dice rolled.
3rd Feb 2020, 3:55 PM
Ryan
Ryan - avatar
0
Here's a messy bit of code. My computer is at home, so I wrote this fron memory real quick. https://code.sololearn.com/cJQgU71gxKYf/?ref=app
3rd Feb 2020, 6:29 PM
Ryan
Ryan - avatar