Space Station

Developer(s): Tim Hartnell
Date: 198x
Type: Program
Platform(s): TS 1000

Appears on

Assembled by Tim Ward from many sources. Contains programs 10211 – 10251.

Gallery

Space Station

Source Code

   0 REM "SPACE STATION"                  TIM HARTNELL
   2 FAST 
   3 RAND 
   4 CLS 
   5 LET CTR=0
  10 GOSUB 3000
  20 LET YEAR=YEAR+1
  30 LET FOLK=INT FOLK+FOLK/INT (((RND*18)+1)+2)-FOLK/INT (((RND*15)+1)+3)
  40 GOTO 710
  50 PRINT "COMPUTER REPORT:"
  60 PRINT 
  70 IF OXY<OXYNEED*FOLK THEN GOTO 8000
  80 IF FOOD<FOODNEED*FOLK THEN GOTO 8100
  90 IF CASH<1 THEN GOTO 8200
  97 IF FOLK<1 THEN GOTO 8500
  98 IF FOLK<2 AND CTR=1 THEN GOTO 8500
 100 IF FOLK<2 THEN GOTO 8300
 110 IF FOLK<13 THEN PRINT "WARNING - POPULATION IS","NEARING EXTINCTION"
 120 IF OXY<2*OXYNEED*FOLK THEN PRINT "WARNING - OXYGEN SUPPLIES LOW"
 130 IF FOOD<2*FOODNEED*FOLK THEN PRINT "WARNING - FOOD STOCKS LOW"
 140 IF CASH<2000 THEN PRINT "WARNING - MONEY RUNNING LOW"
 150 PRINT "%*%*THERE ARE ";INT FOLK;" PEOPLE ON"
 160 PRINT "THE SPACE STATION IN YEAR ";YEAR;"%*%*"
 170 PRINT 
 180 PRINT "MONEY CREDIT IS £";CASH
 190 PRINT "ANNUAL MAINTENANCE:  £";REPAIR
 200 PRINT "OXYGEN TANKS HOLD  ";(INT (OXY*100)/100);" UNITS"
 210 PRINT "OXYGEN COSTS £";OXYCOST;" PER UNIT"
 220 PRINT "OXYGEN NEED PER PERSON:  ";OXYNEED
 230 PRINT 
 240 PRINT "FOOD STOCKS STAND AT ";(INT (FOOD*100)/100)
 610 LET U=INT ((RND*11)+1)+128
 620 FOR J=1 TO 32
 630 PRINT CHR$ (U);
 640 NEXT J
 650 PRINT 
 700 RETURN 
 710 GOSUB 50
 712 PRINT "ARTEFACTS - HOW MANY WILL YOU",,"MAKE AND TRADE?"
 714 PRINT "THEY USE UP ";ARTCOST;" UNITS OF"
 718 PRINT "OXYGEN AND SELL FOR £";ARTPAY 
 720 INPUT B
 730 IF B*ARTCOST>OXY THEN PRINT "NOT ENOUGH OXYGEN"
 740 IF B*ARTCOST>OXY THEN GOTO 720
 745 LET CASH=CASH+B*ARTPAY
 750 LET OXY=OXY-B*ARTCOST
 755 CLS 
 760 GOSUB 50
 762 PRINT "FOOD COSTS £";FOODCOST;" PER UNIT"
 763 PRINT "EACH PERSON NEEDS ";FOODNEED;" UNITS"
 764 PRINT "(£";FOODCOST*FOODNEED;" EACH, £";(INT (FOLK*FOODCOST*FOODNEED)*10)/10;" FOR STATION)"
 766 PRINT "THIS WILL LAST ";(INT (FOOD/(FOODNEED*FOLK)*10)/10);" YEARS        AT THE PRESENT POPULATION"
 770 PRINT "HOW MUCH FOOD WILL YOU BUY?"
 780 INPUT C
 790 IF C*FOODCOST>CASH  THEN PRINT "NOT ENOUGH MONEY"
 800 IF C*FOODCOST>CASH  THEN GOTO 780
 805 LET FOOD=FOOD+C*FOODCOST
 810 LET CASH=CASH-C*FOODCOST
 820 CLS 
 830 GOSUB 50
 850 PRINT "HOW MUCH OXYGEN WILL YOU BUY?"
 855 PRINT "(CURRENT STOCKS WILL LAST FOR   ";(INT (OXY/(OXYNEED*FOLK)*10)/10);" YEARS AT THE PRESENT          POPULATION)"
 860 INPUT D
 870 IF D*OXYCOST>CASH THEN PRINT "NOT ENOUGH MONEY"
 880 IF D*OXYCOST>CASH THEN GOTO 860
 890 CLS 
 900 IF INT (RND*5)+1=2 THEN GOSUB 7000
2005 LET FOOD=FOOD-FOLK*FOODNEED
2030 LET CASH=CASH-REPAIR-D*OXYCOST
2040 LET OXY=OXY+D-FOLK*OXYNEED
2050 GOTO 20
3010 LET YEAR=0
3015 LET A$="THE STATION IS DEAD"
3020 LET FOLK=INT (80+INT (RND*40)+1)
3030 LET CASH=7*(700+INT (RND*800+1))/INT (RND*3+1)
3040 LET FOODCOST=INT (RND*7+1)
3050 LET ARTCOST=1+INT (RND*3)+1
3055 LET FOOD=2000+INT (RND*500)+1
3060 LET OXY=2000-INT (RND*1500)+1
3070 LET OXYCOST=INT (RND*7)+1
3080 LET ARTPAY=30*INT (RND*ARTCOST)+1
3090 LET REPAIR=200+INT (RND*400+1)
3100 LET FOODNEED=1+INT (RND*5+1)
3105 LET OXYNEED=2+INT (RND*3+1)
3115 RETURN 
7010 CLS 
7012 LET J=INT (RND*6+1)
7013 PRINT "THE STATION WAS ATTACKED BY"
7014 IF J=1 THEN PRINT "A FLEET OF SYRIAN SHIPS"
7015 IF J=2 THEN PRINT "RENEGADE EARTHLINGS"
7016 IF J=3 THEN PRINT "MARTIAN SPACE PILOTS"
7017 IF J=4 THEN PRINT "VYRILLIEX OUTWORLDERS"
7018 IF J=5 THEN PRINT "A LONE SHIP, APPARENTLY UNDER",,"ROBOT CONTROL"
7019 IF J=6 THEN PRINT "A PARRALEXIAN ESCORT VESSEL"
7020 PRINT 
7025 PRINT 
7027 PRINT 
7030 LET Z=1+(FOLK/INT (RND*15+1)+1)
7040 PRINT "THERE WERE ";INT Z;" PEOPLE KILLED"
7045 PRINT 
7050 LET ZZ=250+INT (RND*250+1)
7060 PRINT "DAMAGE WAS £";ZZ
7062 PRINT 
7065 LET ZZZ=INT (RND*300+1)
7066 LET ZZZZ=INT (RND*300*1)
7067 PRINT "AND FOOD STOCKS HAVE FALLEN",,"BY ";ZZZZ
7069 LET FOOD=FOOD-ZZZZ
7070 LET FOLK=FOLK-Z
7075 LET OXY=OXY-ZZZ
7080 LET CASH=CASH-ZZ
7085 PRINT 
7090 PRINT ,,"PRESS <ENTER>"
7092 INPUT U$
7095 CLS 
7100 RETURN 
8010 PRINT A$
8020 PRINT "YOU RAN OUT OF OXYGEN IN YEAR ";YEAR
8040 GOTO 8020
8100 PRINT A$
8110 PRINT "FOOD SUPPLIES WERE EXHAUSTED IN YEAR ";YEAR
8120 GOTO 8100
8200 PRINT A$
8210 PRINT "THE TREASURY RAN DRY IN YEAR ";YEAR
8220 GOTO 8210
8310 PRINT "YOUR POPULATION HAS FALLEN"
8320 PRINT "TO ";INT (FOLK);".  DO YOU WANT TO"
8330 PRINT "COMMIT SUICIDE PAINLESSLY"
8340 PRINT "NOW (1), AWAIT A SAD AND"
8350 PRINT "LINGERING DEATH (2), OR"
8355 PRINT "WAIT AND HOPE FOR NEW COLONISTS"
8356 PRINT "(3)?"
8360 INPUT B
8365 CLS 
8366 PRINT "I HOPE YOU HAVE CHOSEN WELL"
8367 FOR H=1 TO 50
8368 NEXT H
8370 IF B=1 THEN GOTO 8400
8384 IF B=2 THEN GOTO 8395
8386 IF B=3 THEN LET NC=INT (5*RND)+1
8387 IF NC=1 THEN LET FOLK=FOLK+INT (RND*26+1)
8388 IF NC=1 THEN LET CASH=CASH+INT (RND*300+1)
8389 IF NC>1 THEN GOTO 8390
8391 LET CTR=CTR+1
8395 GOTO 20
8400 PRINT A$
8401 PRINT "YOU MADE IT TO YEAR ";YEAR+1
8402 PRINT "GOODBYE"
8410 GOTO 8402
8500 PRINT A$
8510 PRINT "ALL COLONISTS HAVE DIED"
8520 PRINT "YOU MADE IT TO YEAR ";YEAR+1
8530 GOTO 8402
8550 STOP 
8560 REM RAND USR 14336
8570 REM SAVE "SPASTA.B1"
8575 SAVE "1021%5"
8580 RUN 
Scroll to Top