zd : n  , : "Westward Ho! 1847" : : x ) "(c) David H. Ahl, 1986" : ,::Initialization DA$(), EP(), MP(), PL$()O f :  : t : :Put data in variables "Press any key when you're ready to go" : RN () : RNRN :  RN : RNRN : : RN :   : :Display the scenario  : :Make initial purchasesC  : :How good a shot are you?~ : " Your trip is about to begin..." : : ::Main program M v : :Reached the final segment?JJ : :Iterate through 2-week trip segments- J  : :On the trail too long?^" : "Monday, " DA$(J) ", 1847. You are ";, I  : MMP(I) I : PL$(I)6 F "You're low on food. Better buy some or go hunting soon." @ KS KH r : :Any sickness or injuries?RJTT : T  : "Doctor charged $10 for his services ";T "to treat your ";: KS "illness." : "injuries."^KS : KH : :Set illness and injury flags to normalhM(M) : MAM : :Update cumulative mileage=r MP "Total mileage to date is 950." : MP : j| "Total mileage to date is" (M)MM(An)  () : :Calculate how far we travel in 2 weeks "Here's what you now have (no. of bullets, $ worth of other items):"!  : :Print inventoryW  : :Stop at fort, hunt, or push on routineu  : :Eating routine n : : :Riders attack routine  : : :Hazards and events routine P : :Mountains routine  : :End of the 2-week trip segment#:O:Subroutine to print initial scenarios ) "Westward Ho! 1847" :  " Your journey over the Oregon Trail takes place in 1847. Start-"  "ing in Independence, Missouri, your goal is to take your family of"> "five over 2040 tough miles to Oregon City." " Having saved $420 for the trip, you bought a wagon for $70 and"& "now have to purchase the following items:" : 0 " * Oxen (spending more will buy you a larger and better team which"P: " will be faster so you'll be on the trail for less time)"D " * Food (you'll need ample food to keep up your strength and health)"N " * Ammunition ($1 buys a belt of 50 bullets. You'll need ammo for"1X " hunting and for fighting off attacks by bandits and animals)|b " * Clothing (you'll need warm clothes, especially when you hit the"l " snow and freezing weather in the mountains)"v " * Other supplies (includes medicine, first aid supplies, tools, and"< " wagon parts for unexpected emergenicies)" :  " You can spend all your money at the start or save some to spend" "at forts along the way. However, items cost more at the forts. You"  "can also hunt for food if you run low." : : :J:Subroutine to get initial purchases of player : "How much do you want to pay for a team of oxen";A : A(A) Ad "No one in town has a team that cheap." :  A . "You choose an honest dealer who tells you that $" A "is too much for"y "a team of oxen. He charges you $150 and gives you $" A"change."A "How much do you want to spend on food";F : F(F)  F  : "That won't even get you to the Kansas River";.  " -- better spend a bit more." : r  AF, "You won't have any for ammo and clothes.":   "How much do you want to spend on ammunition";B : B(B) * B "Better take a bit just for protection." :  7!4 AFB@ "That won't leave any money for clothes." :  t!> "How much do you want to spend on clothes";C : C(C)!H C \ : "Your family is going to be mighty cold in";!R " the mountains." : "Better spend a bit more." : >8"\ AFBCY "That leaves nothing for medicine." : >v"f "How much for medicine, bandages, repair parts, etc.";R"pR(R) : R "That's not at all wise." : f"z AFBCR^ "You don't have that much money." : f5#T^AFBCR : : "You now have $" T "left." : B2B :=#:n#:Subroutine to initialize shooting routine# : "Please rank your shooting (typing) ability as follows:"# " (1) Ace marksman (2) Good shot (3) Fair to middlin'"%$ " (4) Need more practice (5) Shaky knees"I$ "How do you rank yourself";DR_$ DR DR $ "Please enter 1, 2, 3, 4, or 5." : $:$:Subroutine to stop at fort, hunt, or push on% (J)J $ : :Are we on an even trip segment?J% "Want to (1) stop at next fort, (2) hunt, or (3) push on";X% X X "Enter a 1, 2, or 3 please." : % X : X L,% KQ  : : :Not enough ammo to hunt?&$ "Would you like to (1) hunt or (2) continue on";XC&. X X "Enter a 1 or 2 please." : $^&8 X :  : f&B:&L:Subroutine to stop at a fort&V T j : "You sing with the folks there and get a good"'` "night's sleep, but you have no money to buy anything." : O'j "What would you like to spend on each of the following;"'t "Food";P1 : "Ammunition";P2 : "Clothing";P3'~ "Medicine and supplies";P4 : PP1P2P3P4 : P1+P1 : P2!P2( "The storekeeper tallies up your bill. It comes to $" PU( TP TTP : FFP1 : BBP2 : CC+P3 : RR+P4 : ( "Uh oh. That's more than you have. Better start over.": j(:(:Subroutine to hunt(KQ : B'  : :Enough ammo to hunt?2) "Tough luck. You don't have enough ammo to hunt." : KQ : U)MM- :  : BR p) d() BR  ) "Nice shot...right on target...good eatin' tonight!")FFBR : BB BR : * "Right between the eyes...you got a big one!" : FF()E* "Full bellies tonight!" : BB () : *  "You missed completely...and your dinner got away." : *:*:Subroutine to eat*( F  : :Not enough food? +2 "Do you want to eat (1) poorly (2) moderately or (3) well";EF+< E E "Enter a 1, 2, or 3 please." : 2+FFF E : F : :Eating more food than you have?+P E +ZFF E : "You don't have enough to eat that well." : 2+d: ,n:Subroutine for riders attack@,x () ((Md)H)((Md) ) v,X$"" : GH : ()L~ X$"don't " : GH, : "Riders ahead! They " X$ "look hostile.", "You can (1) run, (2) attack, (3) ignore them, or (4) circle wagons."- "What do you want to do";GTS- GT GT "Please enter 1, 2, 3, or 4." : - ()L~ GHGH : :Maybe they're hostile after all- GH  : :Are they friendly?- GT , , J, r-:-:Try to run awayD.MM : RR : BB : AA :  : :Lose stuff when you runL.:e.:Attack the riders.  : BBBR(P : :Firefight uses ammo. BR "Nice shooting -- you drove them off." : / BR "Kind of slow with your Colt .45." : Y/" "Pretty slow on the draw, partner. You got a nasty flesh wound."/,KH : "You'll have to see the doc soon as you can." : /6:/@:Ignore the riders/J ()L "They did not attack. Whew!" : 0TBB : RR : 0^:-0h:Circle wagonsW0r  : BBBRP : MM : _0|:0:Cost of each tactic if riders were friendly0 GT MM : AA : 0 GT MM : BBd : 0 GT  : MM0: 1:Final messages about ridersK1 GH  : :Were riders hostile?1 "Riders were friendly, but check for possible losses." : 1 "Riders were hostile. Better check for losses!"1 B : :  : "Oh my gosh! ";=2 "They're coming back and you're out of ammo! Your dreams turn to"2 "dust as you and your family are massacred on the prairie.": & 2:2:Subroutine to deal with hazards and special events2RNd() : :RN determines which event happens23 I  : :Iterate through possible eventsp3& RNEP(I) I : I : :If event happened, exit loop30 I D3: I X, v, , , , ,  , 3D I ,  , . , j ,  ,  ,  , 2 3N:74X "Your wagon breaks down. It costs you time and supplies to fix it."V4bMM() : RR : ^4l:4v "An ox gores your leg. That slows you down for the rest of the trip."4MM : AA : 4:5 "Bad luck...your daughter breaks her arm. You must stop and"R5 "make a splint and sling with some of your medical supplies."x5MM() : RR() : 5:5 "An ox wanders off and you have to spend time looking for it."5MM : 5:#6 "Your son gets lost and you spend half a day searching for him."26MM : :6:~6 "Nothing but contaminated and stagnant water near the trail."6 "You lose time looking for a clean spring or creek."6 MM () : 6:7  M R : :If in mountains, go to snow; otherwise raing7* "Heavy rains. Traveling is slow in the mud and you break your spare"74 "ox yoke using it to pry your wagon out of the mud. Worse yet, some"7> "of your ammo is damaged by the water."8HMM () : RR : BB : FF : ;8R "Cold weather...Brrrrrrr!...You ";b8\ C () "don't "; :C18f "have enough clothing to keep warm."8p C1 : @ : 8z:8 "Bandits attacking!" : 8BBBR : B  : TT79 "You try to drive them off but you run out of bullets."p9 "They grab as much cash as they can find." : 9 BR  : :Good response time?9 "You get shot in the leg--"; :  : KH: "and they grab one of your oxen." : AA : RRA: "Better have a doc look at your leg...and soon!" : {: "That was the quickest draw outside of Dodge City.": "You got at least one and drove 'em off." : ::: "You have a fire in your wagon. Food and supplies are damaged."0;MM : FF : BB : RR() : 8; :; "You lose your way in heavy fog. Time lost regaining the trail."; MM () : ;$ :;. "You come upon a rattlesnake and before you are able to get your gun"%<8 "out, it bites you." : BB : RR : R V g B'  : "You're almost out of ammo; can't reach more."> "The wolves come at you biting and clawing." : KH :  > BR  > "Nice shooting pardner...They didn't get much" : ? "Kind of slow on the draw. The wolves got at your food and clothes."D? BBBR : CCBR : FFBR : L? :? "You're caught in a fierce hailstorm; ammo and supplies are damaged."? MM () : BB : RR() : ? :? :Problems from not eating well enough?A@ E @ : : :If eating poorly, go to sickness routinee@ E () @ : @ E () @ : @( :@2 "Helpful Indians show you where to find more food."@< FF : @F :AP :Subroutine to travel through mountains;AZ M : :Not in mountains yet?tAd  ()((Md)H)((Md) )  An "You're in rugged mountain country." : ()L}  Ax "You get lost and lose valuable time trying to find the trail."B MM< :  &B ()Ga}  mB "Trail cave in damages your wagon. You lose time and supplies."B MM() : BB : RR :  B "The going is really slow; oxen are very tired." : MM-2()B :C :South Pass routine4C KP  : :Is the South Pass clear?oC KP : ()L  : :80% chance of blizzardC "You made it safely through the South Pass....no snow!"C M  C KM  : :Through Blue Mts yet?0D KM : ()333  : : :Get through without mishap?VD MP : : :Set south pass flag^D :D "Blizzard in the mountain pass. Going is slow; supplies are lost."D" KB : MM(() : FF : BB : RRE, C() @ : : :Enough clothes?E6 :AE@ :Subroutine to deal with illnessbEJ d() #(E) r ET d()d(((E))  E^ "Serious illness in the family. You'll have to stop and see a doctor"Fh "soon. For now, your medicine will work." : RR : KS :  RFr "Mild illness. Your own medicine will cure it."lF| MM : RR :  F "The whole family is sick. Your medicine will probably work okay."F MM : RR G R : " ...if only you had enough." :  G :6G :Many ways to die on the trailoG "You run out of food and starve to death." : & G T : "You need a doctor badly, but can't afford one." :  G "You have run out of all medical supplies."!H : "The wilderness is unforgiving and you die of ";IH KH "your injuries." :  \H "pneumonia."H "Your family tries to push on, but finds the going too rough";H " without you." : & I "Your oxen are worn out and can't go another step. You try pushing"VI "ahead on foot, but it is snowing heavily and everyone is exhuasted."I :  : "You stumble and can't get up...."I& :  : "Some travelers find the bodies of you and your" J0 "family the following spring. They give you a decent";J: "burial and notify your next of kin." : tJD D((JML)) : DM(Dt) : DD(DtDM)JN "At the time of your unfortunate demise, you had been on the trail"KX "for" DM "months and" DD "days and had covered" (MZ) " miles."AKb " You had a few supplies left:" :  : :  IKl :YKv :Made it!K ML(MA)(MMA) : FF(ML)(E) : K "You finally arrived at Oregon City after 2040 long miles."L "You're exhausted and haggard, but you made it! A real pioneer!"PL D((JML)) : DM(Dt) : DD(DtDM)L "You've been on the trail for" DM "months and" DD "days."L "You have few supplies remaining:" :  L : "President James A. Polk sends you his heartiest"GM "congratulations and wishes you a properous life in your new home."QM  YM :qM :Play again queryM : "Would you like to play again";A$ : M A "Okay, Good luck!" :  : N "Okay. So long for now." :  : "M" : N :3N :Subroutine to print inventorypN "Cash","Food","Ammo","Clothes","Medicine, parts, etc."N* F F : F(F)N4 B B : B(B)N> C C : C(C)NH R R : R(R)NR T,F,B,C,R : : N\ :/Of :Subroutine to read shooting words and datesMOp I  : S$(I) : IOz "POW","BANG","BLAM","WHOP","pow","bang","blam","whop"O I  : DA$(I) : I : O "March 29","April 12","April 26","May 10","May 24","June 7","June 21"DP "July 5","July 19","August 2","August 16","August 31","September 13"P "September 27","October 11","October 25","November 8","November 22"P "December 6","December 20"P :P :Subroutine to read distances and place namesQ I  : MP(I),PL$(I) : I : 4Q 5,"on the high prairie."rQ 200,"near Independence Crossing on the Big Blue River."Q 350,"following the Platte River."Q 450,"near Fort Kearney."Q 600,"following the North Platte River."R 750,"within sight of Chimney Rock."0R 850,"near Fort Laramie."[R 1000,"close upon Independence Rock."R$ 1050,"in the Big Horn Mountains."R. 1150,"folllowing the Green River."R8 1250,"not too far from Fort Hall."RB 1400,"following the Snake River."#SL 1550,"not far from Fort Boise."GSV 1850,"in the Blue Mountains."rS` 2040,"following the Columbia River."zSj:St:Read probabilities of eventsS~ I  : EP(I) : : S 6,11,13,15,17,22,32,35,37,42,44,54,64,69,95S:#T:Subroutine to create a short pause=T I  : I : ET:oT:Subroutine to read a yes/no answerTX$(A$,) : X$"Y" X$"y" A : T X$"N" X$"n" A : T "Don't understand your answer of " A$ "."5U "Please enter Y for 'yes' or N for 'no.' Which is it";A$ : =U:aU:Subroutine to play a fanfareUFQ : FQ, : FQ*, : FQJ,U  FQGq, : FQJ, : FQGq, : U:U:Subroutine to shoot gun#V(RN(()) : :Pick a random shooting wordZV2S1<((,,))((,)) : :Start timerwV< "Type " S$(RN); : X$VF S$(RN)X$ S$(RN)X$ "Nope. Try again. ";: <VPS2<((,,))((,)) : :End timerWZBRS2S1DR :