Game
Not a good way to ask a question. Especially not your first one. Tell us your level of experience, what you are trying to do, what language you are working with, and read the FAQ.
Have you already tried google?
This might be what you are looking for.
Oh... Google... your wonders cease to amaze us...
Have you already tried google?
This might be what you are looking for.
Oh... Google... your wonders cease to amaze us...
This may help:
10 HOME
20 PRINT "press 1 to win."+CHR$(13)+"press 2 to lose."
30 GET A
35 PRINT
40 IF A = 1 THEN FLASH:PRINT "you win!"+CHR$(7)+CHR$(7):NORMAL
50 IF A = 2 THEN PRINT "you lose!"
60 PRINT:PRINT
70 PRINT "would you like to play again?(y/n)"
80 GET A$
90 IF A$ = "y" THEN GOTO 10
100 IF A$= "Y" THEN GOTO 10
110 PRINT "BYE"
That code is the frickin' bomb. Brings back memories of my wayward youth spent coding in front of the sickly green glow of an Apple IIe monitor.
Quote:Original post by Kelly G
This may help:
10 HOME
20 PRINT "press 1 to win."+CHR$(13)+"press 2 to lose."
30 GET A
35 PRINT
40 IF A = 1 THEN FLASH:PRINT "you win!"+CHR$(7)+CHR$(7):NORMAL
50 IF A = 2 THEN PRINT "you lose!"
60 PRINT:PRINT
70 PRINT "would you like to play again?(y/n)"
80 GET A$
90 IF A$ = "y" THEN GOTO 10
100 IF A$= "Y" THEN GOTO 10
110 PRINT "BYE"
LOL! You have forgotten about an important line...
5 REM Text Adventure
[LOL]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement