Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / reactivity

Author
Message
D Man
21
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 4th Oct 2002 13:28
Yesterday, I wrote an stupid little game.
Your goal is it to push the displayed buttons as fast as you can to win "reactivity".

Good luck

time=1000
randomize timer()
do
a=0
time=time-time/10
z=rnd(8)+1
repeat
cls
inc a,1
b=asc(inkey$())
set cursor 1,1
print a
print z
if b0 then exit
until a=time
if bz+48 then print "HAHA ...YOU LOST!!!" : exit
if time
"If you can't make it good
make it look good."
Bill Gates
D Man
21
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 4th Oct 2002 13:31
What's that?
I thought when I pressed "code" that it should be an
"code snipped".
Once again:
[img]time=1000
randomize timer()
do
a=0
time=time-time/10
z=rnd(8)+1
repeat
cls
inc a,1
b=asc(inkey$())
set cursor 1,1
print a
print z
if b<>0 then exit
until a=time
if b<>z+48 then print "HAHA ...YOU LOST!!!" : exit
if time<=90 then print "WOW ...You're a winner!!!" : exit
wait 100
loop
suspend for key[/img]

"If you can't make it good
make it look good."
Bill Gates
Skid
21
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: United Kingdom
Posted: 4th Oct 2002 13:36
D man you have to highlight the code you want as a snipit

Skid
D Man
21
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 5th Oct 2002 18:34
So ...here is the fixed code.
I forgot to use sync.



"If you can't make it good
make it look good."
Bill Gates

Login to post a reply

Server time is: 2024-04-19 02:38:53
Your offset time is: 2024-04-19 02:38:53