06-13-2022, 12:17 PM
Here's a classic.
Code: (Select All)
'HURKLE HUNT
Randomize Timer
Locate , 23: Print "H U R K L E H U N T"
Print: Print: Print
Print "Adapted from the game 'Hurkle' as presented by Creative Computing"
Print: Print: Print
Do
found$ = "no"
n = 6
g = 10
' change n and g to change the difficulty of the game
Print "A Hurkle is hiding somwhere in a "; g; " by"; g; " grid."
Print "Homebase is at 0,0 and you must guess the hurkles location."
Print "(X is West - East, Y is North - South)"
Print "Each turn you may enter your guess as an x,y coordinate."
Print "Hints will be provided if you guess wrong."
Print
hx = Int(Rnd * g) + 1
hy = Int(Rnd * g) + 1
Do
Print "- - - - - -"
Print "You have "; n; " guesses left."
Print "Where do you think the Hurkle is Hiding?"
Input x, y
n = n - 1
Print
If x = hx And y = hy Then
found$ = "yes"
Print "YOU FOUND THE HURKLE !"
Print
Else
Print "Look ...";
If y < hy Then Print "north";
If y > hy Then Print "south";
If x < hx Then Print "east"
If x > hx Then Print "west"
Print
End If
Loop Until found$ = "yes" Or n = 0
If found$ = "yes" Then
Print "That was just "; n; " guesses!"
Else
Print
Print "SORRY YOU DON'T HAVE ANY GUESSES LEFT."
Print
End If
Print
Print "Play again ? (Yes or No)"
Input askquit$
askquit$ = Left$(LCase$(askquit$), 1)
Loop Until askquit$ = "n"