Jed's Five & Ten

Evaluate the Definitions block before playing the StupidGame.

Definitions

Off[General::spell1] ;

\(\(stupidGame[] := 
        Module[{}, 
location\  = \ 
            Random[Integer, {1, 
                3}]; 
places\  = \ {"barrel", "stove", "chimney"}; 
Print["John-boy has stolen a gumball from Jed's Five & Ten."]; 
Print["He is hiding behind either "]; 
Do[
            Print[i, ") ", \ places[\([i]\)]], {i, 1, 
              3}]; 
found\  = \ 
            False; 
While[\(! found\), 
guess = 
              InputString["Shoot at which location?"]; 
If[\((guess\  == \ 
                    ToString[location]\ )\) || \ \((guess\  == \ 
                    places[\([location]\)])\), 
 (*\ 
                then\ *) \ \ found = True, 
 (*\ 
                else\ *) \ \ \(Print["Nope, try again."];\)
]
]; 
Print["Pa, they shot John-boy!  We give, we give, here's your gumball back!"];
];\)\)

Play the stupid game.

stupidGame[];