--- title: "Work Simulation" id: 53817 type: "computer_media" slug: "work-simulation" url: "http://localhost/computer_media/work-simulation/" markdown_url: "http://localhost/computer_media/work-simulation.md" published_at: "2024-05-13T18:56:53+00:00" modified_at: "2026-03-30T21:46:28+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2019/02/20230809-041332.jpg" excerpt: "Run a factory, manage workers, survive union strikes and flash floods, and try to turn a profit in this randomized business management simulation." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" genre: - name: "Game" slug: "game" taxonomy: "genre" url: "http://localhost/type/game/" - name: "Resource Management" slug: "resource-management" taxonomy: "genre" url: "http://localhost/type/resource-management/" - name: "Simulation" slug: "simulation" taxonomy: "genre" url: "http://localhost/type/simulation/" media_contents: - id: 53877 title: "SINCUS Exchange Tape 101 – Entertainment" type: "computer_media" url: "http://localhost/computer_media/sincus-exchange-tape-101-entertainment/" media_type: "Program" images: - url: "http://localhost/wp-content/uploads/2024/05/work-simulation.png" media_type_tags: "Game, Resource Management, Simulation" --- # Work Simulation This program is a turn-based factory management simulation in which the player runs a business manufacturing and selling fictional products called “Zibbies.” Each week the player hires or fires workers, sets production targets, and faces randomized events including union pay demands, flash floods destroying stock, and supplier price increases. A sales resistance factor stored in variable `z` accumulates percentage price increases and directly influences weekly sales volume through the formula at line 4040. Starting conditions — capital, stock, sell price, manufacturing cost, workforce, wages, and productivity — are all randomized at initialization, with a guard at line 9070 ensuring the manufacturing cost never exceeds the sell price. *** ## Program Analysis ### Program Structure The program is organized as a main loop with clearly labeled subroutines. The main loop at lines 50–180 increments the week counter and calls subroutines in sequence: status printout, workforce management, production, sales, and random events, before deducting wages and repeating. | Line Range | Section | Purpose | | --- | --- | --- | | 10–180 | Main loop | Week cycle: calls all subroutines, deducts wages | | 3000–3390 | Unpredictables | Random events: union demands, flood, price rise, price opportunity | | 4000–4100 | Sales | Calculates weekly sales volume and updates capital/stock | | 5000–5120 | Printout | Status report; checks win/lose conditions | | 5130–5300 | Make | Player sets production target; applies random shortfall | | 6000–6100 | People | Hire and fire workers; union limits firing | | 8000–8080 | Bankruptcy/Win | End-game handling for both outcomes | | 9000–9500 | Variables | Randomized initialization of all game parameters | ### Game Variables - `capital` — liquid cash on hand ($500–$999 at start) - `stock` — units of Zibbies in warehouse - `sellprice` — retail price per Zibbie - `cost` — manufacturing cost per Zibbie (always less than `sellprice`) - `workforce` — number of employees - `wage` — weekly wage per employee - `produce` — units one worker can make per week - `z` — cumulative sales resistance factor; starts at 1 and grows with each price increase - `week` — current week counter ### Sales Resistance Mechanic The variable `z` is the simulation’s most economically interesting mechanic. It is initialized to 1 at line 9130 and incremented by each percentage price increase the player applies (line 3345: `IF a>0 THEN LET z=z+a`). Weekly sales volume is calculated at line 4040 as `INT(RND*stock/(z/100))+1`. As `z` grows, the divisor `z/100` increases, reducing expected sales. This creates a direct trade-off between short-term revenue gain from price increases and long-term sales volume decline. ### Random Event System The unpredictables subroutine (lines 3000–3390) runs four independent probability checks each week using `RND`: 1. **Union pay demand** (55% chance): raises `wage` by 1–7% 2. **Flash flood** (15% chance): destroys up to half of current `stock` 3. **Supplier price rise** (30% chance): increases `cost` by a random fraction 4. **Price raise opportunity** (35% chance, or always if `make>=sellprice`): player can voluntarily raise `sellprice` Each event is independent; multiple adverse events can occur in a single week. ### Production Shortfall At line 5170, actual production is reduced from the player’s target: `LET make=make-INT(RND*make/5*(z/100))`. This means higher sales resistance (larger `z`) also degrades manufacturing efficiency — an arguably unintended coupling between the pricing variable and production output. At the default `z=1`, the shortfall is at most 20% of target; as `z` grows this worsens. ### Firing Mechanic When the player chooses to fire workers, the union intervenes: line 6050 replaces the requested number with `INT(RND*a+1)`, meaning the actual number fired is random between 1 and the requested amount. This prevents deterministic workforce reduction and adds friction to downsizing decisions. ### Win and Lose Conditions The status printout at line 5025 checks `capital+stock<1` for bankruptcy (routing to line 8000) and at line 5027 checks `capital+stock>999999` for the million-dollar win condition. Note that `stock` is measured in units, not dollar value, so this check treats units and dollars interchangeably — a minor economic inconsistency, since a large inventory at low prices could prematurely trigger bankruptcy or inflate the apparent total. ### Notable Techniques and Idioms - Currency rounding is applied consistently using the pattern `INT(100*value)/100` at lines 3040, 3220, and 3350 to keep prices to two decimal places. - The BEEP calls throughout use `RND*50` for pitch, producing random tones as audio feedback rather than musical notes. - The status subroutine at line 5000 is called three times per week (lines 100, 120, 140) to give the player updated information after each action phase. - Line 4045 briefly sets a random `PAPER` color and clears screen before restoring defaults at line 4055, creating a brief flicker effect during the sales calculation delay. - The initialization guard at line 9070 (`IF cost>sellprice THEN GO TO 9050`) loops until a viable starting configuration is found, preventing an immediately unwinnable game. - The end-game restart at line 8070 uses `RUN` (which re-executes from line 1) rather than `GO TO 9000`, ensuring all variables are cleanly re-initialized. ### Bugs and Anomalies - Line 3110 contains a typo in the string literal: `"Stand by for damage repoty:"` — “repoty” should be “report”. - At line 3290, the condition `RND<.65 AND make.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 make0 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 ```