1 DEF SEG=0:KEYLOCK=PEEK(1047):POKE 1047,96:KEY OFF:RANDOMIZE TIMER:COLOR 14,1:CLS:LOCATE 4,1
2 L=0:DIM M$(62):FOR M=1 TO 62:READ M$(M):NEXT M
3 DATA t120,o1,l16,b9,n0,ba,an0,bn0,bn0,ba,aa,n0,b9,n0,ba,an0,bo2,l16,e-9,n0
4 DATA e-d-,d-n0,e-n0,e-n0,e-d-,d-d-,n0,e-9,n0,e-d-,d-n0,e-o2,l16,g-9,n0,g-e,en0
5 DATA g-n0,g-n0,g-e,ee,n0,g-9,n0,g-e,en0,g-o2,l16,b9,n0,ba,an0,g-n0,g-n0,g-ee,en0
6 DATA o1,b9,n0,ba,an0,b
11 PRINT:PRINT:PRINT TAB(17);"TRY TO GOVERN ANCIENT SUMERIA FOR 10 YEARS"
12 PRINT:PRINT TAB(26);"PRESS ENTER TO START"
21 D1=0:P1=0:Z=0:P=95:S=2800:H=3000:E=H-S:Y=3:A=H/Y:I=5:Q=1
22 D=O
23 PRINT:Z=Z+1:CLS:LOCATE 2,1:PRINT TAB(10);"HAMMURABI:YEAR";Z
24 PRINT TAB(9);"";D;"STARVED, ";I;"BORN":P=P+I:IF Q>0 THEN 26
25 P=INT(P/2):PRINT TAB(10);"HORRIBLE PLAGUE!"
26 PRINT TAB(10);"POPULATION =";P:PRINT TAB(10);"YOU OWN";A;"ACRES"
27 PRINT TAB(10);"WHICH PRODUCED";Y;"BUSHELS PER ACRE"
28 PRINT TAB(10);"RATS ATE";E;"BUSHELS STORED":PRINT TAB(9);"";S;"BUSHELS STORED"
29 IF Z=11 THEN 65
30 C=INT(10*RND(1)):Y=C+17:PRINT TAB(10);"LAND =";Y;"BUSHELS / ACRE"
31 INPUT"          ACRES TO BUY";Q:IF Q<0 THEN 64
32 IF Y*Q<=S THEN 34
33 GOSUB 61:GOTO 31
34 IF Q=0 THEN 36
35 A=A+Q:S=S-Y*Q:C=0:GOTO 40
36 INPUT"          ACRES TO SELL";Q:IF Q<0 THEN 64
37 IF Q<A THEN 39
38 GOSUB 61:GOTO 36
39 A=A-Q:S=S+Y*Q:C=0
40 INPUT"          BUSHELS FOR FEED";Q:IF Q<0 THEN 64
41 IF Q<=S THEN 43
42 GOSUB 61:GOTO 40
43 S=S-Q:C=1
44 INPUT"          ACRES TO SEED";D:IF D=0 THEN 53
45 IF D<0 THEN 64
46 IF D<=A THEN 48
47 PRINT TAB(10);"YOU DON'T HAVE THAT MANY ACRES":GOTO 44
48 IF INT(D/2)<=S THEN 50
49 GOSUB 61:GOTO 44
50 IF D<10*P THEN 52
51 PRINT TAB(10);"NOT ENOUGH PEOPLE":GOTO 44
52 S=S-INT(D/2)
53 GOSUB 63:Y=C:H=D*Y:E=0:GOSUB 63:IF INT(C/2)<>C/2 THEN 55
54 E=INT(S/C)
55 S=S-E+H:GOSUB 63:I=INT(C*(20*A+S)/P/100+1):C=INT(Q/20)
56 Q=INT(10*(2*RND(1)-.3)):IF P<C THEN 22
57 D=P-C:IF D>.45*P THEN 59
58 P1=((Z-1)*P1+D*100/P)/Z:P=C:D1=D1+D:GOTO 23
59 PRINT:PRINT TAB(9);"";D;"PEOPLE STARVED!"
60 PRINT TAB(10);"YOU ARE IMPEACHED.":GOTO 77
61 PRINT TAB(10);"THINK AGAIN. YOU HAVE JUST";S;"BUSHELS":RETURN
62 PRINT TAB(10);"THINK AGAIN. YOU ONLY HAVE";A;"ACRES":RETURN
63 C=INT(RND(1)*5)+1:RETURN
64 PRINT"  HAMMURABI: I CAN'T DO THAT. GET YOURSELF A ANOTHER STEWARD!":GOTO 77
65 PRINT TAB(10);"IN 10 YEARS";P1;"% STARVED YEARLY"
66 PRINT TAB(10);"A TOTAL OF";D1;"DIED!":L=A/P
67 PRINT TAB(10);"YOU STARTED WITH 10 ACRES/PERSON":PRINT TAB(10);"AND ENDED WITH";L;"ACRES/PERSON"
68 PRINT:IF P1>33 THEN 60
69 IF L<7 THEN 60
70 IF P1>10 THEN 75
71 IF L<9 THEN 75
72 IF P1>3 THEN 76
73 IF L<10 THEN 76
74 PRINT TAB(10);"FANTASTIC PERFORMANCE!":GOTO 77
75 PRINT TAB(10);"VERY HEAVY HANDED!":PRINT TAB(10);"PEOPLE ARE REBELLING!":GOTO 77
76 PRINT TAB(10);"NOT BAD, BUT COULD BE SOMEWHAT BETTER."
77 PRINT"     DO YOU WANT TO PLAY AGAIN Y/N ? ";
78 WHILE INKEY$<>"":WEND:D$=""
79 D$=INKEY$:IF D$="Y" THEN 21
80 IF D$="N" THEN PRINT D$:PRINT"     SO LONG FOR NOW.":FOR T=1 TO 1000:NEXT T:POKE 1047,KEYLOCK:SYSTEM
81 GOTO 79
