Rick Barrett wrote:
> I've accomplished this...but I'm pretty sure the way I set up the
> scoring isn't the most efficient way to do it, but I don't know how else
> to do it. Can anyone help me?

I suggest that you separate the "model" from the "view"

That is, if you do the rolling like this:

  roll_1 = rand(6)
  roll_2 = rand(6)

then roll_1 and roll_2 have a numeric value between 0 and 5. This is a 
natural representation (model) of the state of the roll, making 
calculation easy:

  score = score + (roll_1 + 1) + (roll_2 + 1)

The "view" part is when you want to translate this into something to 
display:

  puts faces[roll_1]
  puts faces[roll_2]

Actually, the logic would probably be clearer if you make roll_1 and 
roll_2 be a random value between 1 and 6 rather than 0 and 5. You can 
adjust your faces array so that the zero'th element is blank. As a 
convenient side-effect, you can use your faces array for playing dominos 
too :-)
-- 
Posted via http://www.ruby-forum.com/.