Advertisement
plirof2

Basic ZX CSSCGC RetroWars Extensions ONLY

Apr 27th, 2022 (edited)
1,197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Basic ZX CSSCGC RetroWars Extensions ONLY______________________________________
  2. 10 LET ITEMS=6: DATA "ZX",175,"Amstrad",250,"C64",595,"AMIGA",1000,"MSX",550,"Atari ST",999
  3. 21 DATA "London","Dallas","Athens","Paris","Berlin"
  4.  
  5. 10 LET ITEMS=6: DATA "ZX",175,"Amstrad",250,"C64",595,"AMIGA",1000,"MSX",550,"Atari ST",999
  6. 21 DATA "London","Dallas","Athens","Paris","Berlin"
  7.  
  8. ________________________________________
  9. 1 REM A=ITEMS, C=cash, D=debt, U=holding qty, B=base price $, P=pricing, F=cur location,T=day, I=int rate
  10. 2 REM To DO : 1.Change Prices between cities,2.Fix Move (don't show Quanity before travel) ,3.End in 30 days
  11. 9 REM Initialize game state and vars
  12. 10 LET ITEMS=6: DATA "ZX",175,"Amstrad",250,"C64",595,"AMIGA",1000,"MSX",550,"Atari ST",999
  13. 11 LET D=1000: LET C=D: LET T=1: LET F=5: DIM A$(ITEMS,8): DIM B(ITEMS): DIM P(ITEMS): DIM L$(5,8): DIM U(ITEMS)
  14. 12 FOR X=1 TO ITEMS: READ A$(X): READ B(X): NEXT X
  15. 20 FOR X=1 TO ITEMS: LET P(X)=(RND*1+0.1)*B(X): NEXT X
  16. 21 DATA "London","Dallas","Athens","Paris","Berlin"
  17. 22 FOR X=1 TO 5: READ L$(X): NEXT X
  18. 30 CLS
  19. 31 PRINT "---";L$(F);"---"'"Day:";T;"  Cash:";C;" Owe:";D:
  20. 32 PRINT "Holding","For Sale"
  21. 35 FOR X=1 TO ITEMS: PRINT X;") ";A$(X);:
  22. 37 PRINT ;"["; U(X);: PRINT "] $";(STR$ P(X))(1 TO 5):
  23. 39 NEXT X
  24. 40 PRINT "";:
  25. 41 INPUT "(B)uy, (S)ell, (M)ove";I$:
  26. 42 IF I$="b" OR I$="s" OR I$="m" THEN INPUT "Type=";G: INPUT "Qty=";Q:
  27. 43 LET H=G: IF I$="b" THEN GO TO 60
  28. 44 IF I$="s" THEN GO TO 70
  29. 50 IF I$="m" THEN CLS :
  30. 51 FOR X=1 TO 5: PRINT X;"- ";L$(X): NEXT X:
  31. 52 INPUT "Where to? (1-5)";F: LET T=T+1: LET D=D*1.06:
  32. 54 GO TO 30
  33. 59 REM Buying routine
  34. 60 LET X=Q*P(H): IF X>C OR P(H)=0 OR U(H)+Q>100 THEN BEEP 1,1: GO TO 63
  35. 61 LET U(H)=U(H)+Q: LET C=C-(Q*P(H)):
  36. 63 GO TO 30
  37. 69 REM Selling routine
  38. 70 IF Q>U(H) THEN BEEP 1,1: GO TO 73
  39. 71 LET U(H)=U(H)-Q: LET C=C+(Q*P(H))
  40. 73 GO TO 30
  41. 79 REM Bank routine NOT Done yet
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement