Advertisement
Guest User

prgmPONG2

a guest
Oct 8th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ClrHome
  2. Disp "","   Welcome to","      Pong!
  3. Pause
  4. 8->B
  5. 4->A
  6. 4->C
  7. 4->D
  8. randInt(0,1->E
  9. randInt(0,1->F
  10. 0->Z
  11. 0->Y
  12. Repeat B=1 or B=16
  13. ClrHome
  14. Output(A,B,"o
  15. Output(C,1,"!
  16. Output(D,16,"!
  17. getKey
  18. If Ans=73 and C>1
  19. C-1->C
  20. If Ans=93 and C<8
  21. C+1->C
  22. If Ans=25 and D>1
  23. D-1->D
  24. If Ans=34 and D<8
  25. D+1->D
  26. If A=1
  27. 0->E
  28. If A=8
  29. 1->E
  30. If E=1
  31. A-1->A
  32. If E=0
  33. A+1->A
  34. If F=1
  35. B-1->B
  36. If F=0
  37. B+1->B
  38. If A=C and B=2
  39. 0->F
  40. If A=D and B=15
  41. 1->F
  42. Y+randInt(3,5->Y
  43. Z+randInt(3,5->Z
  44. End
  45. If B=1
  46. Then
  47. Disp "Right wins!
  48. Y->Z
  49. Else
  50. Disp "Left wins!
  51. End
  52. Pause
  53. prgmSCORE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement