• Post Reply Bookmark Topic Watch Topic
  • New Topic

Changing number of sides on a dice from 6 to 12  RSS feed

 
D Doemer
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I have this really a graphics program that I'm working on which displays a single die, and right now it is set to the default 6 sides. I need to change it to 12. Here is the program:





I'm assuming I have to change these 2 lines,



but I don't know what to write to do that. Do I have to add more code somewhere further up in the program, or is there a line to replace these two lines to make it 12-sided?

Thanks
 
D Doemer
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never mind, guys. I just found the answer somewhere else online (Thank GOD). Lol

 
Mike. J. Thompson
Bartender
Posts: 689
17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You haven't posted the Dice code so we can't know how (or even if) the Dice can be 12 sided.

Does Dice have a constructor that takes a parameter specifying how many sides it takes?
 
Mike. J. Thompson
Bartender
Posts: 689
17
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You beat me to it!
 
D Doemer
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks anyway -- first one I've gotten right all semester I think lol
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!