Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 10 print chr$(147)
- 20 cpu=int(rnd(1)*3)+1:gosub 100
- 30 print"welcome to rock, paper, scissors. press:"
- 40 print"r for rock":print"p for paper":print"s for scissors":print""
- 45 print"press any other key to quit":print""
- 50 p$="":get p$:if p$="" then goto 50
- 60 if p$="r" then gosub 200
- 70 if p$="p" then gosub 300
- 80 if p$="s" then gosub 400
- 90 print"goodbye":end
- 100 if cpu=1 then c$="rock"
- 110 if cpu=2 then c$="paper"
- 120 if cpu=3 then c$="scissors"
- 130 return
- 200 print"you chose rock, i chose ";c$:print""
- 210 if c$="rock" then print"draw!"
- 220 if c$="paper" then print"you lose!"
- 230 if c$="scissors" then print"you win!"
- 240 gosub 500
- 300 print"you chose paper, i chose ";c$:print""
- 310 if c$="rock" then print"you win!"
- 320 if c$="paper" then print"draw!"
- 330 if c$="scissors" then print"you lose!"
- 340 gosub 500
- 400 print"you chose scissors, i chose ";c$:print""
- 410 if c$="rock" then print"you lose!"
- 420 if c$="paper" then print"you win!"
- 430 if c$="scissors" then print"draw!"
- 440 gosub 500
- 500 print""
- 501 print"thanks for playing"
- 505 print""
- 510 print"press y to play again"
- 520 q$="":get q$:if q$="" then goto 520
- 530 if q$="y" then goto 10
- 540 print"goodbye":end
- run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement