Beetle type game in c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Beetle type game in c++

I need help with a game I'm trying to make that is supposed to work like the game beetle? I don't know where to start really. How do you make a random number generator to resemble a six sided die, how do i use the enter key to roll another die. This is what the game should include: Can-cells have the following body parts 1. Body, quantity 1 2. Head, quantity 1 3. Wings, quantity 4 4. Legs, quantity 6 5. Eyes, quantity 2 6. Tail, quantity 1 Can-cell body parts must be collected in the following order 1. The body must be acquired first. 2. The head must be acquired before the eyes. 3. Legs, tail and wings can be acquired anytime after the body. The die values map to body parts as follows (how do i map out the numbers of the die to the body parts) 1. Body 2. Head 3. Wing 4. Leg 5. Eye 6. Tail also how do I keep track of both players inventory as well as rounds played? Like this: ************************** Welcome to Can-cell ************************** ################ Round # 1 Hit enter to roll die: Player one roll is BODY --------------------- Player 1 Inventory Body: 1 Head: 0 Eye: 0 Wing: 0 Leg: 0 Tail: 0 Player two roll is TAIL, must have BODY first --------------------- Player 2 Inventory Body: 0 Head: 0 Eye: 0 Wing: 0 Leg: 0 Tail: 0

28th Feb 2020, 1:43 AM
Ash
Ash - avatar
2 Answers
0
I was thinking about doing if statments but I'm not sure it would work, I also looked up that switch statments can work, I cant use arrays though
28th Feb 2020, 1:44 AM
Ash
Ash - avatar
0
The comment that you can’t use arrays and the fact that you haven’t posted any sample code has me puzzled. Hopefully this is not homework... The best way to learn coding is to start doing. To tackle a multipart program requires you to break it down into manageable pieces. First figure out the die piece then move onto another part. I will give you the clue that the die will require use of random numbers. It is covered in the Sololearn c++ course or you can readily google it.
28th Feb 2020, 2:36 AM
Elizabeth Kelly
Elizabeth Kelly - avatar