![]() |
Little help with programming.
I'm in a programming class and I've got my first assignment. We have to make a game of Yahtzee. I've got the whole game programmed except one part. After a set of rolls we have to make an output that would look like this:
ROLL #3 Dice 1: 1 Dice 2: 1 Dice 3: 3 Dice 4: 3 Dice 5: 1 You have rolled 3 1's I've probably over complicated the program by making this set of instructions for each roll (sets each die# to a random number at the beginning of the program): cout |
whoa! holy fuck... i had a programming class in high school, they told us to make a game of blackjack that would randomly deal cards and bust you over 21... i was the only one where the computer popped up and said "fuckwit..." i sucked at it
|
....hell i learned programing when you had to use a tape to rewind on the apple 3 dos and the word 'run' was used a lot lmao
BM...good luck with that, I hope someone can help you. |
I don't think I'm horrible (only had a few little assignments so far) but I have a nasty habit of over-complicating things.
|
So you want it to tell you many dice you have rolled or the added up total? I'm confused.
|
It needs to say the total number of like dice. For example if you have rolled 3 2's. It would need to output "You have rolled 3 2's.
|
Ah icic, well on that note I'll have to wait until tomorrow to see the program in action.
|
I'm getting it to where I can make it tell me how many like numbers I have. Still trying to figure out how to make it tell me what those numbers are.
|
Patience young Padawan.
|
Two hours of staring at code and my patience is gone. I'm taking a break.
|
I hate to self-bump, but this damn thing is making me want to put my head through the wall. I'm so fucking close, just that one little part.
|
Finally done.
|
All times are GMT +1. The time now is 12:17 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0 PL2