Millionaire is a life-simulation game. You type your name and are born, rich or poor, on a farm or in a small town; then the program walks through your life a few years at a time. You get jobs (teacher, lawyer, computer programmer, bus driver or football player) with a salary and expenses, and random events come up: trips to Las Vegas or Atlantic City where you choose a bet, news flashes such as a tornado hitting your home, loans with interest, and more. When you die, the money you have made is your score, and $1,000,000 wins the game.
The REM lines credit Craig Gunnett’s “Millionaire” from More BASIC Computer Games (Creative Computing, Morristown, New Jersey), “Modified for 2068 by D. Bennett”: the TS2068 conversion is by Dave Bennett.
Program Analysis
Structure
Lines 100–350 set up a life: the birth date (shown in the 1980s) and whether your parents are rich (M between 10,000 and 15,000) or poor. The subroutine at 680 picks a job and sets yearly earnings E and expenses C. The main loop at 390 runs 13 stages; each picks a random event number Q from 1 to 13 and jumps to its routine, then adds (E-C)*Y9 for the years passed. A negative balance is treated as a loan, and interest is charged each stage.
Ending
Death comes at random once the years pass a threshold (lines 450–480), and the final tally at 2370 adds the value of any stocks you bought and compares the total with the million-dollar goal, with different verdicts for debt, under $500,000 and under a million.
Notable Techniques
- Month names come from slicing a single 36-character string,
M$(3*T-2 TO 3*T). - INK switches to red while you are in debt.
Potential Issues
- Line 550 (
IF Q(Q)=1 THEN GO TO 560) appears meant to pick another event when one has already happened, but it falls through, so events can repeat. - The year arithmetic in lines 392–470 appears to jump the calendar about, so the dates shown can move oddly between stages.
This copy came from a Larken disk and was converted for tape: the LKDOS prefix on the save line and the LOGICALL menu load were removed. It was tested in ZEsarUX.
Source Code
1 BORDER 0: PAPER 0: INK 7
3 CLS : FLASH 1: PRINT AT 0,11;"MILLIONAIRE": FLASH 0: PRINT : PRINT TAB 7;"Creative Computing": PRINT : PRINT TAB 5;"Morristown, New Jersey"
4 PRINT
5 REM MORE BASIC COMPUTER GAMES
8 REM MILLIONAIRE BY CRAIG
9 REM GUNNETT
10 REM Modified for 2068 by
11 REM D. Bennett
15 POKE 23658,8
17 INK 7
18 PRINT
20 PRINT "This is the game of Millionaire.All you must do is type in your name and answer some questions. The decisions you make will determine how much money you make. At the time of your death, your life will be rated by the amount of money you made throughout your life. If you have made $1,000,000 , you will be a Millionaire and win the game."
25 PRINT : PRINT "Name Please?"
90 RANDOMIZE 0
100 LET O=-1: LET C=0: LET N=0
110 DIM A$(20): DIM Z$(1): DIM M$(36): DIM S(9): DIM Q(16)
120 FOR I=1 TO 4
130 LET S(I)=150
140 NEXT I
150 INPUT A$
160 CLS
170 PRINT ,,,,"O.K. ";A$
172 PRINT "This is your new life!"
180 LET M$="JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC"
190 IF RND>.5 THEN GO TO 220
200 PRINT "On a big farm";
210 GO TO 230
220 PRINT "In a small town";
230 LET T=INT (RND*12)+1
240 PRINT ", On ";M$(3*T-2 TO 3*T-2+3-1);" ";INT (RND*28)+1;", 1987"
250 PRINT A$
252 PRINT "is born."
260 PRINT "Your parents are very ";
270 IF RND>.5 THEN GO TO 310
280 PRINT "rich."
290 LET M=INT (RND*5000)+10000
300 GO TO 330
310 PRINT "poor."
320 LET M=INT ((RND+RND))/2*1000
330 LET T=INT (RND*12)+1
340 LET Y=2003+INT (RND*10)+1
350 PRINT "On ";M$(3*T-2 TO 3*T-2+3-1);" ";INT (RND*28)+1;", ";Y;", you leave home"
352 PRINT "with $";M
370 LET Y=Y+INT (RND*3)+1
380 GO SUB 680
390 FOR J=1 TO 13
392 IF Y<70 THEN LET Y=Y+2018+INT (RND*15)+1
394 IF Y>=2096 THEN LET Y=Y-10
395 LET Y9=INT (RND*6)+5
396 IF M<0 THEN LET N=INT M/3+INT (RND*5000)+1500
398 IF M>=0 THEN INK 7
400 IF (J/3)-INT (J/3)+E=0 THEN GO SUB 680
410 LET D=INT (28*RND)+1
420 LET M1=(INT (12*RND)+1)*3
430 PRINT
435 PRINT ,," Type ENTER to continue ...": PAUSE 4e4: CLS
438 IF M<0 THEN INK 2
440 PRINT ,,,,M$(M1-2 TO M1-2+3-1);" ";INT (RND*28)+1;", ";Y
450 IF Y-1986<70 THEN GO TO 500
460 IF RND>.5 THEN GO TO 500
468 IF Y-1987<0 THEN LET Y=Y-1985+2001+Y9*INT (RND*10)
470 IF Y-1987=0 THEN LET Y=Y+2018+Y9+INT (RND*15)+1
480 PRINT "You are dead (Couldn't tell could you?) at the age of ";Y-1987;"."
490 GO TO 2370
500 IF M>=0 THEN GO TO 540
510 LET I=ABS INT (.07*Y9*(-N))
520 LET M=M-I
530 PRINT "The interest on your loan is"
532 PRINT "$";I;". You have $";M;"."
540 LET Q=INT (13*RND)+1
550 IF Q(Q)=1 THEN GO TO 560
560 LET Q(Q)=1
562 IF Q=1 THEN GO TO 890
564 IF Q=2 THEN GO TO 1010
566 IF Q=3 THEN GO TO 1100
568 IF Q=4 THEN GO TO 1220
570 IF Q=5 THEN GO TO 1280
572 IF Q=6 THEN GO TO 1430
574 IF Q=7 THEN GO TO 1530
576 IF (Q-7)=1 THEN GO TO 1850
578 IF (Q-7)=2 THEN GO TO 1930
580 IF (Q-7)=3 THEN GO TO 2060
582 IF (Q-7)=4 THEN GO TO 2120
584 IF (Q-7)=5 THEN GO TO 2240
586 IF (Q-7)=6 THEN GO TO 2280
590 PRINT ,,,,"You now have $";M
600 IF O=-2 THEN GO TO 1530
610 IF J=1 THEN GO TO 640
620 LET M=M+(E-C)*Y9
630 PRINT ,,,,"Your earnings and expenses leave you with $";M
640 LET Y9=INT (RND*6)+5
650 LET Y=Y+Y9
660 NEXT J
670 GO TO 470
680 REM JOB SUB
690 PRINT "You got a new job as a "
695 LET H=INT (RND*5)+1
700 IF H=1 THEN GO TO 740
702 IF H=2 THEN GO TO 770
704 IF H=3 THEN GO TO 800
706 IF H=4 THEN GO TO 830
710 PRINT "Teacher";
720 LET E=INT (RND*4000)+17000
730 GO TO 850
740 PRINT "Lawyer";
750 LET E=INT (RND*40000)+80000
760 GO TO 850
770 PRINT "Computer Programmer";
780 LET E=INT (RND*5000)+20000
790 GO TO 850
800 PRINT "Bus Driver";
810 LET E=INT (RND*2000)+16000
820 GO TO 850
830 PRINT "Football Player";
840 LET E=INT (RND*100000)+100000
850 LET C=E-10000+INT ((RND+RND)*5000)
860 PRINT ". You earn"
862 PRINT "$";E;" a year."
870 PRINT "You adjust your expenses"
872 PRINT "to $";C;" a year."
880 RETURN
890 LET K=INT (RND*3)+1
894 IF K=1 THEN GO TO 900
896 IF K=2 THEN GO TO 904
898 IF K=3 THEN GO TO 890
900 PRINT "You go to Las Vegas to gamble. How much do you bet?"
902 GO TO 906
904 PRINT "You go to Atlantic City to gamble. How much do you bet?"
906 INPUT S
910 CLS
920 IF S<=0 THEN GO TO 1000
930 IF RND>.7 THEN GO TO 970
940 LET S2=-INT (RND*S)
950 PRINT ,,,,"Ha! Ha! You lost $";-S2
960 GO TO 990
970 LET S2=INT ((RND+RND)*S)
980 PRINT ,,,,"You won $";S2
990 LET M=M+S2
1010 PRINT "You are offered a coin supposedly worth $100,000."
1020 PRINT "Do you buy it?"
1030 INPUT Z$
1040 CLS
1050 LET V7=INT (RND*200000)+1
1060 IF Z$<>"Y" THEN GO TO 1080
1070 LET M=M-100000+V7
1080 PRINT ,,,,"The value of the coin"
1082 PRINT "is $";V7
1090 GO TO 590
1100 PRINT "You are seriously sick. (Couldn't tell could you?)"
1110 PRINT "You have ";
1115 LET J=INT (RND*3)+1
1120 IF J=1 THEN GO TO 1130
1122 IF J=2 THEN GO TO 1150
1124 IF J=3 THEN GO TO 1170
1130 PRINT "The Asio-Dispepsia Regionally Hypnotic Flu (OH!)."
1140 GO TO 1180
1150 PRINT "Computer Itis."
1160 GO TO 1180
1170 PRINT "Infectious Fatally Reoccuring Bad Breath."
1180 LET U=INT (RND*1000)+500
1190 LET M=M-U
1200 PRINT "Health expenses cost you $";U
1210 GO TO 590
1220 LET F=INT (RND*100000)
1230 LET C8=INT (F/2)-INT (RND*(F/2))
1240 PRINT "Your Grandfather Grovers just died. (OH!) He left you $";F;","
1242 PRINT "but funeral expenses are"
1244 PRINT "$";C8
1260 LET M=M-C8+F
1270 GO TO 590
1280 IF E=0 THEN GO TO 890
1290 PRINT "News from your boss:"
1295 PRINT
1298 LET B=INT (RND*3)+1
1300 IF B=1 THEN GO TO 1310
1302 IF B=2 THEN GO TO 1350
1304 IF B=3 THEN GO TO 1390
1310 LET L=INT (RND*3000)+1
1320 LET E=E-L
1330 PRINT "You got a $";L;" decrease in pay. You now earn $";E
1340 GO TO 590
1350 PRINT "YOU'RE FIRED!! (HA!)"
1360 LET E=0
1370 LET C=INT (C/4)
1380 GO TO 590
1390 LET R6=INT (RND*5000)+1
1400 LET E=E+R6
1410 PRINT "You got a raise of $";R6
1412 PRINT "You now earn $";E
1420 GO TO 590
1430 PRINT "The Doctor says you need a Vacation. Do you go?"
1440 INPUT Z$
1450 CLS
1460 LET V=INT (RND*2000)+1000
1462 LET V1=INT (RND*20)+10
1470 IF Z$="N" OR Z$="NO" THEN GO TO 1500
1472 IF RND>.7 THEN GO TO 1485
1480 PRINT ,,,,"Good, Your vacation to the Islands costs $";V
1482 GO TO 1510
1485 PRINT ,,,,"Good, Your vacation across town costs $";V1
1490 LET M=M-V1: GO TO 590
1500 PRINT ,,,,"You just had a nervous breakdown. Medical costs are $";V
1510 LET M=M-V
1520 GO TO 590
1530 FOR I=1 TO 4
1540 LET S(I)=INT ((INT (RND*100)+100+2*S(I))/3)
1550 NEXT I
1560 PRINT "# STOCK NAME PRICE SHARES OWNED"
1570 PRINT "1 IBM ";S(1);" ";S(5)
1580 PRINT "2 USS ";S(2);" ";S(6)
1590 PRINT "3 NCR ";S(3);" ";S(7)
1600 PRINT "4 TWA ";S(4);" ";S(8)
1610 IF S(9)=1 THEN GO TO 2410
1620 PRINT "Do you buy, sell ($100 Fee), or not? (B,S,N)"
1630 INPUT Z$
1640 CLS
1650 IF Z$="S" THEN GO TO 1740
1660 IF Z$="N" THEN GO TO 1810
1670 PRINT ,,,,"Stock# & Quantity?"
1680 INPUT S3: INPUT S0
1690 CLS
1700 LET S(4+S3)=S(4+S3)+S0
1710 LET O=-2
1720 LET M=M-S(S3)*S0-100
1730 GO TO 1620
1740 PRINT ,,,,"Stock# & Quantity?"
1750 INPUT S2: INPUT S5
1755 CLS
1760 IF RND<.5 THEN GO TO 1880
1770 IF S5>S(4+S2) THEN GO TO 1740
1780 LET S(4+S2)=S(4+S2)-S5
1790 LET M=M+S(S2)*S5-100
1800 GO TO 1560
1810 LET S1=S(5)+S(6)+S(7)+S(8)
1820 IF S1>0 THEN GO TO 610
1830 LET O=-1
1840 GO TO 610
1850 FLASH 1: PRINT "NEWS FLASH!!!": FLASH 0
1852 LET W=INT (RND*3)+1
1854 IF W=1 THEN GO TO 1860
1855 IF W=2 THEN GO TO 1880
1856 IF W=3 THEN GO TO 1852
1858 PRINT
1860 PRINT "A tornado has just hit the home of ";A$
1870 GO TO 1890
1880 PRINT "An airplane has just crashed into the home of ";A$
1890 LET D8=INT (RND*50000)+1
1900 LET M=M-D8
1910 PRINT "Damages have been estimated at $";D8
1920 GO TO 590
1930 PRINT "Oh! You just got ";
1940 IF Y-1984<55 THEN GO TO 2000
1950 IF RND>.4 THEN GO TO 1980
1960 PRINT "cancer."
1970 GO TO 2010
1980 PRINT "a heart attack."
1990 GO TO 2010
2000 PRINT "leukemia."
2010 LET M2=INT (RND*5000)+1000
2020 LET M=M-M2
2030 PRINT "Medical bills are $";M2
2040 IF RND<.5 THEN GO TO 470
2050 GO TO 590
2060 PRINT "You just had a car accident! Medical costs are";
2070 LET M3=INT (RND*3000)+1000
2080 LET Q7=INT (RND*5000)+100
2090 PRINT " $";M3;". Repairs cost $";Q7
2100 LET M=M-M3-Q7
2110 GO TO 590
2120 IF E=0 THEN GO TO 1010
2130 LET E2=10000+INT (RND*5000)
2140 PRINT "You are offered another job for $";E2;" a year."
2150 PRINT "Would you like to moonlight?"
2160 INPUT Z$
2170 CLS
2180 IF Z$="N" OR Z$="NO" THEN GO TO 590
2185 LET Y=INT (RND*3)+1
2190 IF Y=1 THEN GO TO 2200
2192 IF Y=2 THEN GO TO 1350
2194 IF Y=3 THEN GO TO 2220
2200 LET E=E+E2
2210 GO TO 590
2220 PRINT ,,,,"From overwork you get ";
2230 GO TO 1980
2240 LET R2=INT (RND*10000)+5000
2250 LET M=M-R2
2260 PRINT "Your home has been robbed of goods worth $";R2
2270 GO TO 590
2280 IF O=-1 THEN GO TO 1430
2290 IF RND>.7 THEN GO TO 1430
2300 LET B4=INT (RND*4)
2310 PRINT "Stock Market Crash!!! Each of your ";S1;" shares of stock"
2320 PRINT "is worth $";B4;"."
2330 PRINT "You must sell all of them for a"
2335 PRINT "total of $";S1*B4;"."
2340 LET M=M+S1*B4
2350 LET O=-1
2360 GO TO 590
2370 PRINT "You had $";M
2380 IF O=-1 THEN GO TO 2430
2390 LET S(9)=1
2400 GO TO 1530
2410 LET M=M+S(1)*S(5)+S(2)*S(6)+S(3)*S(7)+S(4)*S(8)
2420 PRINT "With stock value you"
2422 PRINT "have $";M
2430 IF M<0 THEN GO TO 2480
2440 IF M<500000 THEN GO TO 2510
2450 IF M<1E+06 THEN GO TO 2530
2460 PRINT A$
2462 PRINT "WON! YOU ARE A MILLIONAIRE!!!"
2470 GO TO 2540
2480 PRINT "You lousy #$%&'*!!! now your poor family has to pay off your debts.................."
2500 GO TO 2540
2510 PRINT "Not bad, ";A$
2520 GO TO 2540
2530 PRINT "Close, ";A$
2532 PRINT "Maybe next life."
2540 PRINT "Thanks for playing Millionaire, ";A$
9992 SAVE "MILION.B1" LINE 1
9998 REM was LKDOS-onlyNote: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.


