Its late and its one of the first times in a while I've sat down and read a tutorial...currently have been following TDK's Tutorials which are very well done and I'm learning a lot. Well..long story short I am adding to his number guessing game he posts at the end of chapter 1 in his tuts, and I would like you guys to just try out what I have so far, its not a whole lot trust me..but I guess I value your opinions quite a lot. I intend to add a lot to this and try and take it beyond just a guessing game..so um..yea thanks guys.
Zombie
hehehe almost forgot the code haha.
sync on:cls:sync rate 30
gosub opening_talks
opening_talks:
text 0,100, "Hello all, Zombie here. I've revised this number game from a tut."
text 0,120,"Its really fun to do this and I hope it all works out, so um..enjoy"
wait 3000
cls
return
Print "I have thought of a number between 1 and 100. See how quickly you can guess it!"
Print "But first I would like to know your name"
Input "Please what is your name?";name$
Print "Hello there ";name$
Print "Lets have some fun today okay?"
wait 3000
Randomize Timer(): Rem Initialise the random number generator
Start:
MyNumber=Rnd(99)+1: Rem Select a random number between 1 and 100
Do: Rem Main Program Loop
cls
Print
Input "What is your guess? ",Guess
Print
If Guess < MyNumber: Rem If chosen number is lower than computer's number
circle 200,200,50
circle 180,180,10
circle 220,180,10
ellipse 200,220,20,15
text 300,300, "Teh Asweomezz!!"
Print "Your guess was too low. Try again."
Sleep 2000
Endif
If Guess > MyNumber: Rem If chosen number is higher than computer's number
Print "Your guess was too high. Try again."
Sleep 2000
Endif
If Guess = MyNumber: Rem If chosen number is equal to computer's number
Print "Your guess was correct. Well done!!"
Print
Print "Do you want to play again (Y/N)?"
Repeat: Rem Repeat...Until loop repeats until Y or N key is pressed
I$=Upper$(Inkey$()): Rem Read the keyboard for keypresses
Until I$="Y" or I$="N"
If I$="Y": Rem If Y was pressed
Goto Start: Rem Jump to Start label at beginning of program
Else
CLS
Print "Goodbye...thanks for playing!! "
End
Endif
Endif
Loop