Re: modifying a program




"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?

The command line parameters he speaks of is handled in the main easily.
That's what the (String [] args) arguments are all about.
args[0] would have a value of "6" in the example you gave, and args[1] would
be "6".
Keep in mind these are strings.
That should be enough without writing the code for you, which your professor
wouldn't want us to do.


.



Relevant Pages

  • >>>> CONQUER GAMES <<<<
    ... command and conquer 3 game, programs to penetrate the game conquer, ... conquer game risk, conquer online game download, game replays command ...
    (comp.sys.ibm.pc.hardware.systems)
  • Re: This weekends great Genesis haul
    ... to START GAME if you are beginning a new game or NEW GAME if you are ... Black dots represent evil settlements of people, ... BAR and each symbol on the bar represents a command. ... MANNA BAR are,, RAISE AND LOWER LAND, PLACE ...
    (rec.games.video.sega)
  • [Review] Commands and Colors: Ancients
    ... but none so much as Command and Colors: ... was finally being produced by a war game company. ... Units can attack via a ranged attack or close combat, ... The first player to reach a certain amount of victory ...
    (rec.games.board)
  • Re: The tiny roguelike scene
    ... A general "use" command while all the type specific commands still ... number of keys used small is "the" good thing. ... rejection of change in general when it comes to simplifying the UI. ... between simplifying the interface and simplifying the game. ...
    (rec.games.roguelike.development)
  • Re: UI/logic seperation done right
    ... UIs: text/keyboard based, graphical/mouse based, and audio UI (for blind ... That is game dependent. ... He might do a lot of things before doing so, using the look command, ... "parameters" of the action (i.e. the affected cards), ...
    (rec.games.roguelike.development)