Work Simulation

Type: Program
Platform(s): TS 2068

Work simulation game. Manufacture Zibbies against all odds.

Appears on

Source Code

   10 REM worksimul
   40 GO SUB 9000: REM variables
   50 LET week=week+1
  100 GO SUB 5000: REM printout
  110 GO SUB 6000: REM people
  120 GO SUB 5000: REM printout
  130 GO SUB 5130: REM make
  140 GO SUB 5000: REM printout
  150 GO SUB 4000: REM sales
  160 GO SUB 3000: REM unpretictables
  170 LET capital=capital-wage*workforce
  180 GO TO 50
 3000 REM unpredictables
 3005 CLS 
 3010 IF RND<.45 THEN GO TO 3100
 3020 LET a=INT (RND*7)+1
 3025 BEEP .5,RND*50: BEEP .4,RND*50
 3030 PRINT ''"Unions demand ";a;"% payraise"
 3040 LET wage=INT (100*(wage+(a*wage/100)))/100
 3050 PAUSE 100
 3060 PRINT '''"Pay per employee is now $";wage
 3070 PAUSE 100
 3075 BEEP .5,RND*50: BEEP .4,RND*50
 3080 CLS 
 3100 IF RND<.85 THEN GO TO 3190
 3110 PRINT ''' INK 2; FLASH 1;"Flash flood ruins some of your"," stock",,,,"Stand by for damage repoty:",
 3120 PAUSE 100
 3130 LET a=INT (RND*stock/2)+1
 3140 LET stock=stock-a
 3150 PRINT '' INK 1; FLASH 1;"Total stock destroyed was",a;" Zibbies, worth $";a*sellprice;" retail"
 3160 PAUSE 100
 3170 PRINT ''"Stock on hand is now ";stock
 3180 PAUSE 100
 3190 IF RND>.3 THEN GO TO 3290
 3195 CLS 
 3200 PRINT ''"Supplier announces dramatic","price rise!"
 3220 LET a=INT ((RND*100*cost/7))/100
 3225 IF a<.01 THEN GO TO 3220
 3230 PRINT ''"Cost of making Zibbies","goes up by "; FLASH 1; INK 2;"$";a; FLASH 0; INK 0;" each"
 3240 PAUSE 100
 3250 LET cost=cost+a
 3260 PRINT '' INK 7; PAPER 1;" It now costs "; FLASH 1; INK 7; PAPER 0;"$";cost;" "
 3270 PRINT "to make each one"
 3280 PAUSE 100
 3290 IF RND<.65 AND make<sellprice THEN RETURN 
 3300 CLS 
 3305 BEEP .5,RND*50: BEEP .4,RND*50
 3310 PRINT ''"You have a chance to raise","your price"
 3320 PRINT "Zibbies now sell for $";sellprice
 3330 PAUSE 100
 3340 INPUT FLASH 1;"What percentage increase? ";a
 3345 IF a>0 THEN LET z=z+a
 3350 LET sellprice=INT (100*(sellprice+a*sellprice/100))/100
 3360 PAUSE 50
 3370 PRINT ' FLASH 1; INK 3;"Zibbies now sell for $";sellprice
 3380 PAUSE 100
 3390 RETURN 
 4000 REM sales
 4005 BEEP .5,RND*50: BEEP .4,RND*50
 4010 PRINT FLASH 1; PAPER 5;'"Total stock is ";stock
 4015 PAUSE 100
 4020 PRINT FLASH 1; PAPER 3;'"Stand by for sales report....."
 4025 PAUSE 300
 4030 CLS 
 4040 LET a=INT (RND*stock/(z/100))+1
 4045 PAPER RND*6: CLS : BORDER RND*6
 4050 IF a>stock THEN GO TO 4040
 4055 BORDER 7: PAPER 7: CLS 
 4060 PRINT '' INK 1;"Total Zibbies sold: ";a
 4070 LET stock=stock-a
 4080 PRINT '"Income from sale: $";a*sellprice
 4090 LET capital=capital+a*sellprice
 4095 PAUSE 100
 4100 RETURN 
 5000 REM printout
 5020 FOR g=40 TO 50: BEEP .008,g: BEEP .008,60-2*g: NEXT g
 5022 CLS 
 5025 IF capital+stock<1 THEN GO TO 8000: REM bankrupt
 5027 IF capital+stock>999999 THEN PRINT FLASH 1; BRIGHT 1; INK 2;"You've made a million!!": PAUSE 500: GO TO 8050
 5030 PRINT INK 2; FLASH 1;"  FACTORY REPORT: WEEK ";WEEK;" "
 5040 PRINT ' INK 2;"Capital on hand is $";capital
 5050 PRINT ' INK 1;"Your stores hold ";stock;" Zibbies";TAB 10;"worth $";stock*sellprice
 5060 PRINT INK 2;'"They sell for $";sellprice;" each"
 5070 PRINT INK 2;"and cost $";cost;" each to make"
 5080 PRINT INK 7; PAPER 1;'"Workforce is ";workforce;" people"
 5090 PRINT PAPER 1; INK 7;"Their wages are $";wage;" each"," and the wage bill this week"," is $";wage*workforce
 5100 PRINT INK 2;'"Each person can make ";produce;" Zibbies a week, a total output of ";produce*workforce
 5120 RETURN 
 5130 INPUT "How many do you want to make? ";make
 5135 IF make=0 THEN RETURN 
 5140 IF make*cost>capital THEN PRINT INK 2; FLASH 1;"Not enough money": GO TO 5130
 5150 IF make>produce*workforce THEN PRINT INK 4; FLASH 1;"Not enough people": GO TO 5130
 5160 PRINT AT 0,0; FLASH 1; INK 1;"    Target week ";week;" is ";make;"   "
 5170 LET make=make-INT (RND*make/5*(z/100))
 5180 PAUSE 100
 5190 PRINT INK 3; FLASH 1;AT 0,0;"Total made in week ";week;" was ";make;"   "
 5200 LET stock=stock+make
 5210 LET capital=capital-cost*make
 5220 PAUSE 50
 5300 RETURN 
 6000 REM people
 6010 INPUT "How many people do you want","to hire? ";a
 6020 LET workforce=workforce+a
 6030 PRINT AT 0,0; FLASH 1; INK 1;"    Total workforce is ";workforce
 6035 PAUSE 100: GO SUB 5000
 6037 IF a>0 THEN RETURN 
 6040 INPUT "How many people do you want","to "; FLASH 1; INK 4;"fire? ";a
 6042 IF a=0 THEN GO TO 6090
 6045 IF a>workforce THEN GO TO 6040
 6050 LET a=INT (RND*a+1)
 6060 PAUSE 100
 6070 PRINT FLASH 1; BRIGHT 1; INK 6; PAPER 2;'''"Unions allow you to fire ";a
 6080 LET workforce=workforce-a
 6090 PAUSE 100
 6100 RETURN 
 8000 REM  bankruptcy
 8010 PRINT '''TAB 8; FLASH 1; INK 2;"BANKRUPT!!!!"
 8020 PRINT '''"Oh the shame of it!"
 8030 PRINT '''"Still, you kept the business"
 8040 PRINT "going for "; FLASH 1; INK 1;week; FLASH 0; INK 0;" weeks"
 8050 PRINT '''"Enter 'Y' for another try, or","'N' to give up"
 8055 LET a$=INKEY$
 8060 IF a$="" THEN GO TO 8055
 8070 IF a$="Y" OR a$="y" THEN RUN 
 8080 STOP 
 9000 REM  variables
 9030 LET capital=500+INT (RND*500)
 9040 LET stock=100+INT (RND*50)
 9050 LET sellprice=10+INT (RND*5)
 9060 LET cost=2+INT (RND*5)
 9070 IF cost>sellprice THEN GO TO 9050
 9080 LET workforce=7+INT (RND*10)
 9090 LET wage=12+INT (RND*sellprice*5)
 9100 LET produce=5+INT (RND*6)
 9110 LET week=0
 9120 REM RUN Z is sales resistance  factor
 9130 LET z=1
 9140 PAPER 7: CLS : BORDER 7: INK 0
 9500 RETURN 
 9999 SAVE "worksimul" LINE 1: BEEP 1,32

People

No people associated with this content.

Scroll to Top