home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / gam / ham100.ba < prev    next >
Text File  |  2006-10-19  |  3KB  |  46 lines

  1. 0 'HAM100.BA  Author Unknown
  2. 1 'Club 100 Library - 415/939-1246 BBS,    937-5039 NEWSLETTER, 932-8856 VOICE
  3. 2 CLS:PRINT"PRESS A KEY"
  4. 3 Z=RND(1):A$=INKEY$:IFA$=""THEN3
  5. 4 D1=0:P1=0:Z=0:P=95:S=2800:H=3000:E=H-S:Y=3:A=H/Y:I=5:Q=1
  6. 5 CLS:PRINT"Hammurabi;I beg to report":Z=Z+1:PRINTUSING"Year ##: ### starved - ### came to city";Z,D,I:P=P+I : IF Q>0 THEN 7
  7. 6 P=INT(P/2):PRINT"*** Plague Struck !***";:GOSUB43:PRINT@80,"";
  8. 7 PRINTUSING"Population ####. City owns #### acres.";P,A:PRINTUSING"Harvest was # bu/Ac - Rats ate #### bu";Y,E:PRINTUSING"You have #####, bushels in storage. ";S:IFZ=11THENINPUT"Press enter";Z$:GOTO34
  9. 8 Y=INT(10*RND(1))+17:PRINT"Land is selling at";Y;"bushels per acre"
  10. 9 PRINT@240,"";:INPUT"How many acres will you buy";Q:IF Q<0 THEN 33
  11. 10 IF Y*Q<=S THEN 11ELSEGOSUB30:GOTO9
  12. 11 IFQ=0THEN12ELSEA=A+Q:S=S-Y*Q:C=0:GOTO 15
  13. 12 GOSUB44:INPUT"How many do you wish to sell";Q:IFQ<0THEN33
  14. 13 IFA<=QTHENGOSUB31:GOTO12
  15. 14 A=A-Q:S=S+Y*Q:C=0
  16. 15 GOSUB44:INPUT"How many will you feed the people";Q:IFQ<0THEN33
  17. 16 IFQ>STHENGOSUB30:GOTO15
  18. 17 S=S-Q:C=1
  19. 18 PRINT@240,STRING$(79,32);:PRINT@240,"";:INPUT"How many do you wish to plant";D:IF D<0THEN 33ELSEIFD=0THEN23
  20. 19 IFD>ATHENGOSUB31:GOTO18
  21. 20 IFINT((D+1)/2)>STHENGOSUB30:GOTO18
  22. 21 IFD<=10*PTHEN23
  23. 22 PRINT@280,"There're only";P;"to tend the fields !";:GOSUB43:GOTO18
  24. 23 S=S-INT(D/2):GOSUB32:Y=C:H=D*Y:E=0:GOSUB32:IFINT(C/2)<>C/2THEN25
  25. 24 E=INT(S/C)
  26. 25 S=S-E+H:GOSUB 32:I=INT(C*(20*A+S)/P/100+1):C=INT(Q/20):Q=INT(10*(2*RND(1)-.3)):IFP<CTHEND=0:GOTO5
  27. 26 D=P-C:IFD>.45*PTHEN28
  28. 27 P1=((Z-1)*P1+D*100/P)/Z:P=P-D:D1=D1+D:GOTO5
  29. 28 CLS:PRINT"You starved";D;"people in one year!"
  30. 29 PRINT"Due to this extreme mismanagement you have not only been impeached, but shall he hung at noon!!":GOTO 41
  31. 30 PRINT@280,"Hammurabi, Think again";:GOSUB43:PRINT@280,"You only have";S;"bushels of grain";:GOSUB43:RETURN
  32. 31 PRINT@280,"But sir! You only have";A;"acres!";:GOSUB43:RETURN
  33. 32 C=INT(RND(1)*5)+1:RETURN
  34. 33 PRINT"Hammurabi ! I cannot do as you wish":GOTO41
  35. 34 CLS:PRINT"In your 10 year term of office":PRINTUSING"##.# percent of the population died ";P1:PRINTUSING"per year. A total of ### people died !!";D1:L=A/P:PRINT"You started with 10.0 acres per person":PRINTUSING"and ended with ##.#";L
  36. 35 IF P1>33 OR L<7 THEN 29
  37. 36 IF P1>10 OR L<9 THEN 39
  38. 37 IF P1>3  OR L<10 THEN 40
  39. 38 PRINT"Fantastic performance !!!":GOTO41
  40. 39 PRINT"A Rather poor performance. You will be":PRINT"tarred & feathered on your way out":GOTO 41
  41. 40 PRINT"Your performance wasn't bad. You may":PRINT"get re-elected !!."
  42. 41 BEEP:PRINT"Again ?"; 
  43. 42 A$=INKEY$:IF A$="y"THEN CLS:RUNELSEIFA$=""THEN42ELSEMENU
  44. 43 FORXX=1TO1200:NEXT
  45. 44 PRINT@240,STRING$(79,32);:PRINT@240,"";:RETURN
  46.