home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
forth
/
compiler
/
fpc
/
source
/
p3_27dc.seq
< prev
next >
Wrap
Text File
|
1990-04-06
|
812b
|
34 lines
\ Problem 3.27 by Dickson Cheng 04/06/90 10:57:06.94
: WHITE ( -- )
177 EMIT ;
: SPACE? ( n -- flag )
32 ( space ) = ;
: GAME ( -- )
CR CR ." Press the space bar as hard as you can!"
BEGIN CR
KEY SPACE? NOT IF
." Please space bar only!"
2000 2 TONE
ELSE
CR 64 RND 1+
DUP 0 ?DO WHITE LOOP CR
DUP 25 < IF
." Press it harder!!"
ELSE
DUP 50 < IF
." Not bad! Press real hard!"
ELSE
10 0 DO BEEP LOOP
DROP ." You just busted your space bar!" EXIT
THEN
THEN DROP
THEN
AGAIN ;