Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Adding one last conditional in a random-number guessing game

by ww (Bishop)
on Feb 22, 2014 at 12:57 UTC ( #1075824=note: print w/replies, xml ) Need Help??


in reply to Adding one last conditional in a random-number guessing game

So you want the record of $program_guesses carried over from game to game? You appear to confirm that in your Re^2: Adding one last conditional in a random-number guessing gamein response to hdb's Re: Adding one last conditional in a random-number guessing game.

And do you want the guess record carried over from execution to execution of the game?

That would entail keeping your record of the guesses -- hash, array or list -- in a (tied-)file
      ...and would mean the game could never be "played" more than 10 times!

Update: that is "never" without making the record inaccessible to the script (in effect, deleting the record).

Are you sure you understood your homework assignment correctly? Could it be that the user should not be allowed to guess the same number twice in the course of a single game?

Come, let us reason together: Spirit of the Monastery

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1075824]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2016-12-08 19:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (144 votes). Check out past polls.