Advertisement
linesguy

Waiting in line simulator: Text edition

May 17th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.70 KB | None | 0 0
  1. 0 rem I just realised i've mever made a game in this programming language,
  2. 0 rem So i present to you, Waiting in line simulator: text edition
  3.  
  4. 10 text : home : pr#0 : print "Click inside this screen then press any key to start" : get K$ : home
  5. 20 p = 50
  6. 21 h = 100
  7. 22 a = 100
  8. 23 s = 0
  9. 50 vtab 1 : print "Your position in line: ";P;"/50"
  10. 60 vtab 3 : print "Health: ";H;" "
  11. 70 print "Awake: ";A;" "
  12. 80 print "Score: ";S
  13. 85 print "Coordinates: ";y;",";x;" "
  14. 90 vtab 8 : print "Press P to punch yourself"
  15. 95 vtab 9 : print "Use WASD to move"
  16.  
  17. 100 HW = HW + 1 : if HW > 140 then HW = 0 : if H <> 100 then H = H + 1
  18. 110 AW = AW + 1 : if AW > 70 then AW = 0 : A = A - 1 : if A < 0 then goto 1005
  19. 120 K$ = "" : if peek(-16384)>127 then get K$ : if K$ = "P" then H = H - 10 : A = A + 10 : if A > 100 then A = 100
  20. 121 if k$ = "W" then y = y + 1
  21. 122 if k$ = "A" then x = x - 1
  22. 123 if k$ = "S" then y = y - 1
  23. 124 if k$ = "D" then x = x + 1
  24. 125 if y > 2 then goto 1001
  25. 126 if y < -2 then goto 1002
  26. 127 if x > 2 or x < -2 then goto 1003
  27. 130 if H < 0 then goto 1000
  28. 150 goto 50
  29.  
  30. 1000 home : print "Congratulations, ":?"You died waiting in line" : goto 1020
  31. 1001 home : print "Congratulations, ":?"You hit the customer in front of you, and got kicked out of the line." : goto 1020
  32. 1002 home : print "Congratulations, ":?"You hit the customer behind you, and got kicked out of the line." : goto 1020
  33. 1003 home : print "Congratulations, ":?"You stepped out of the line, and are no longer allowed back in." : goto 1020
  34. 1005 home : print "Congratulations, ":?"You fell asleep waiting in line" : goto 1020
  35. 1020 vtab 6 : print "Final position in line: ";P
  36. 1030 print "Score: ";S
  37. 1050 end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement