Pete, are you going to release a new coding competition?

Discuss whatever you want here--both QB and non-QB related. Anything from the DEF INT command to the meaning of life!

Moderators: Pete, Mods

nkk_kan
Veteran
Posts: 57
Joined: Thu Jun 01, 2006 10:45 am
Location: Gujrat,India,Asia
Contact:

Post by nkk_kan »

i know this is not valid...but i tried to squeeze it...lol....it's 239 without spaces :P

Code: Select all

RANDOMIZE TIMER
? "1.rock"
? "2.paper"
? "3.scissors"
INPUT i
a:
c = INT(RND(1) * 3) + 1
IF c = i OR c < 1 GOTO a
SELECT CASE c
CASE 1
    IF i = 3 THEN r = 1
    if i = 2 then r = 2
CASE 2
    IF i = 1 THEN r = 1
    if i = 3 then r = 2
CASE 3
    IF i = 2 THEN r = 1
    if i = 1 then r = 2
END SELECT
IF r = 1 THEN ? "comp won!"
IF r = 2 THEN ? "You Won!"
SLEEP
Post Reply