
5 REM Janken, for Aquarius, http://rudih.info
8 z=0 : print
10 print "Press <R>ock <P>aper <S>cissors..."
20 x$=inkey$
30 if x$="" goto 20
40 y=int(rnd(1)*3)+1
50 if x$="R" or x$="r" then z=1
60 if x$="P" or x$="p" then z=2
70 if x$="S" or x$="s" then z=3
75 if z=0 then goto 20
80 if z=1 then print "You chose rock."
90 if z=2 then print "You chose paper."
100 if z=3 then print "You chose scissors."
110 if y=1 then print "He chose rock."
120 if y=2 then print "He chose paper."
130 if y=3 then print "He chose scissors."
140 if z=1 and y=2 then print "You lose!"
150 if z=2 and y=3 then print "You lose!"
160 if z=3 and y=1 then print "You lose!"
170 if z=y then print "It's a tie..."
180 if z=1 and y=3 then print "You win!"
190 if z=2 and y=1 then print "You win!"
200 if z=3 and y=2 then print "You win!"
