Re: modifying a program
- From: "Oliver Wong" <owong@xxxxxxxxxxxxxx>
- Date: Tue, 29 Nov 2005 20:23:24 GMT
"patrick_woflian" <gingercrock@xxxxxxxxxxx> wrote in message
news:1133294331.583577.230900@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> PROBLEM:
> 'Modify the game to allowe the user to specify the difficulty of the
> game as command line parameters:
>
> java HiLo nDicenSides
>
> EG java HiLo 2 6 would roll two six sided dice and add the results to
> give a number between one and twelve..
>
> after each game ask the user if they wish to play again.. store and
> display their best score over all the games..
>
>
> any ideas how to go about this?
>
Whenever I roll two six sided dice and add them together, I get a number
between two and twelve (as opposed to one and twelve).
If my memory serves, you're that person who was trying to write a game
in which a single 12 sided die was being rolled, correct? Well, assuming you
got that game working, I would first try to generalize it so that you could
roll dice with any number of sides. Once that works, I'd generalize again so
that any number of dice could be rolled.
- Oliver
.
- References:
- modifying a program
- From: patrick_woflian
- modifying a program
- Prev by Date: modifying a program
- Next by Date: JSDT chat room
- Previous by thread: modifying a program
- Next by thread: Re: modifying a program
- Index(es):
Relevant Pages
|
|