LOGO
Reply to Thread New Thread
Old 05-02-2009, 11:54 PM   #1
payloansday

Join Date
Dec 2005
Posts
605
Senior Member
Default 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
payloansday is offline


Old 05-02-2009, 11:57 PM   #2
Louthcoombutt

Join Date
Oct 2005
Posts
498
Senior Member
Default
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
Louthcoombutt is offline


Old 05-03-2009, 12:01 AM   #3
MilenaJaf

Join Date
Oct 2005
Posts
436
Senior Member
Default
....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.
MilenaJaf is offline


Old 05-03-2009, 12:01 AM   #4
Edifsdubs

Join Date
Nov 2005
Posts
620
Senior Member
Default
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.
Edifsdubs is offline


Old 05-03-2009, 01:54 AM   #5
cyslespitocop

Join Date
Oct 2005
Posts
458
Senior Member
Default
So you want it to tell you many dice you have rolled or the added up total? I'm confused.
cyslespitocop is offline


Old 05-03-2009, 02:00 AM   #6
lymnCymment

Join Date
Oct 2005
Posts
395
Senior Member
Default
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.
lymnCymment is offline


Old 05-03-2009, 02:09 AM   #7
mudozvonf

Join Date
Oct 2005
Posts
426
Senior Member
Default
Ah icic, well on that note I'll have to wait until tomorrow to see the program in action.
mudozvonf is offline


Old 05-03-2009, 02:14 AM   #8
DzjwMKo5

Join Date
Nov 2005
Posts
547
Senior Member
Default
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.
DzjwMKo5 is offline


Old 05-03-2009, 03:05 AM   #9
catarleriarly

Join Date
Oct 2005
Posts
463
Senior Member
Default
Patience young Padawan.
catarleriarly is offline


Old 05-03-2009, 03:18 AM   #10
DevaRextusidis

Join Date
Oct 2005
Posts
445
Senior Member
Default
Two hours of staring at code and my patience is gone. I'm taking a break.
DevaRextusidis is offline


Old 10-03-2009, 02:58 AM   #11
HRS1H7gO

Join Date
Nov 2005
Posts
459
Senior Member
Default
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.
HRS1H7gO is offline


Old 11-03-2009, 01:20 AM   #12
ZanazaKar

Join Date
Oct 2005
Posts
531
Senior Member
Default
Finally done.
ZanazaKar is offline



Reply to Thread New Thread

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

All times are GMT +1. The time now is 10:06 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 PL2
Design & Developed by Amodity.com
Copyright© Amodity