d : : X n  , : "The Orient Express, 1923"x  , : "(c) David H. Ahl, 1986" : , "Press any key to continue." : RN0 () : RNRN : [ RN : RNRN : : RN :  ) "The Mysterious Arms Deal" : : ::Initialization C$(),CN(),CP(),DA(),HZ(),LA$(),LB$(),ME(),N$() TA(),TD(),CS(),MB$(),MD$()M X : :Read data about journey segmentsy p : :Read statements of travelers ~ : :Read names of those on the train  : :Read menu selections  : :Shuffle 24 integers for later use7 "Press any key to call a taxi..." : () : ?:S:Main program" J  : :Iterate through locations, : "February" DA(J) HY "1923" : :Print date6TN(()) : TBTA(J)TN : TTB : J 5@ & : "You have arrived at "LA$(J) ", " LB$(J) " at";:  fJ TN "just" TN "minutes late." : hT TN "almost"; TN "minutes early." : h^ "-- right on time!"h TBTD(J) TTB : TTD(J)::Make sure departure is after arrival<r J v : ME(J)  : :Is it daytime?{| "Asleep in your compartment, you barely notice that the" "departure was right on time at"; :  : , :  J < : :Time to identify the killer and defector?" "Departure is at"; :  : e "Would you like to get off and stretch your legs";A$ :   A "Okay, you stay in your compartment." :  "Okay, but be sure not to miss the train." :  "The taxi has dropped you at Victoria Station in London."[ "The Orient Express is standing majestically on Track 14." : , : , : , : "All aboard..."; , : "train is leaving." : ,   : :Train noises  , : J : : :First leg of trip?X(())[ : "You speak to some of the passengers--" N$(X) "," N$(X) ", " N$(X) " and others--and ask them to keep" "their eyes and ears open and to pass any information--no& "matter how trivial--to you in compartment 13. The Channel"e0 "crossing is pleasant and the first part of the trip uneventful.": J  : :Time to identify the killer and defector?D ME(J) ME(J) ME(J) ,, : :MealsN \ : :Talk to passengersHX HZ(J) HZ(J) ,V : :Snow or bandits on this leg?eb  : :Other hazardsml Juv::Subroutine to serve breakfast : "Breakfast is now being served in the restaurant car." "Press any key when you're ready to have breakfast."K () : : : ,! : "BREAKFAST MENU"s I  : X(I)(()) I,(P(MB$(X))) : MB$(X) :  , : MB$( ) :  : ::Subroutine to serve lunch0 : "An enormous buffet luncheon has been laid out in the ";u "restaurant car." : "Press any key when you have finished."; () : : " B-U-R-P !" : ::Subroutine to serve dinner  : "Dinner is now being served in the restaurant car."F "Press any key when you're ready to have dinner."x  () : : : ," : "DINNER MENU"* I  : X(I)(())4 I,(P(MD$(X))) : MD$(X) : > , : MD$() : , : MD$() H , : MD$() :  : ' R:O \:Subroutine to have conversations f K CN(J) : :Iterate through conversations in this trip segment p J : CMCM : :Ring compartment buzzer and open door!z CP(CS(CM)) XCP(CS(CM)) : X(())L! "Standing there is "N$(X) ", who tells you:" : XCS(CM)! (C$(X))Q C$(X) :  : :If short message, print it!CS(RN)CS(CM) : KAO  ! (C$(X),KA,)" " KA : :Find a space near end of line(" (C$(X),KA) : (C$(X),(C$(X))KA)4" K : <":W":Subroutine for snow"X() : Xff& : :65% chance of snow" : "It is snowing heavily ";" X #z  : :1% chance of getting stuck in the snow&# "but the tracks have been cleared and the train"G# "will not be delayed." : y# "and the train is forced to slow down." : # "Oh no! The train is coming to a stop. Let's hope this is"$ "not a repeat of the trip of January 29, 1929 when the Orient"D$$ "Express was stuck in snowdrifts for five days." : : , m$. "But it looks like it is!" : , $8 "You are stranded for two days until a snowplow clears the track."$B "The train is now exactly two days behind schedule.":HYHY: %L:"%V:Subroutine for banditsR%` () #| : :4% chance of bandits%j HX : HX : :Only one bandit attack%t : "You are rudely awakened from a deep sleep by a loud noise"%~ "as the train jerks to a halt." : J <& "You are shocked to see a bandit waving a gun in your face."& "He demands you give him your wallet, jewelry, and watch." : & , : "The bandits are off the train in a few moments with"' "their loot. They disappear into the forest. No one">' "was injured, and the train resumes its journey." : F':{':Subroutine to deal with miscellaneous hazards' () #{ : :2% chance of derailment' HW : HW : :Only one derailment#( : "You hear a loud screeching noise as the train comes to a"c( "crashing stop. The engine, tender, and first coach are"( "leaning at a crazy angle. People are screaming." : , ( : "While not as bad as the derailment at Vitry-le-Francois in"-)  "November 1911, there is no question that the front of the"[) "train has left the track." : , : ) "You are stranded for exactly one day while the track is")( "repaired and a new locomotive obtained." : HYHY : )2:*<:Subroutine to identify defector and killerZ*F : "The Turkish police have boarded the train. They have been"*P "asked to assist you, but for them to do so you will have to"*Z "identify the killer (the dealer in machine guns) and the defector"*+d "(the Scotch drinker) to them. The arms dealers are lined"h+n "up as follows:" : : " (1) Austrian, (2) Turk , ";+x "(3) Pole, (4) Greek, (5) Rumanian." : + "Who is the defector (a number please)";A1+ "and who is the killer";A2 : , 8, : "The police take into custody the man you identified as the"y, "killer and provide a guard to ride on the train with the", "defector. You return to your compartment, praying that", "you made the correct deductions and identified the right men."- : , : -:C-:Subroutine to check the identitiesr- A1A3 A1A4 @ : :Defector saved?- : "You are suddenly awakened by what sounded like a gunshot."- "You rush to the defector's compartment, but he is okay.">. "However, one of the other arms dealers has been shot." : , . : "You review the details of the case in your mind and realize". "that you came to the wrong conclusion and due to your mistake"/ "a man lies dead at the hand of bandits. You return to your"W/" "compartment and are consoled by the thought that you correctly"/, "identified the killer and that he will hang for his crimes."/6:/@ A2A4 A5 : : :Killer is still on the train0J J : "A man is standing outside. He says, 'You made a"a0T "mistake. A bad one. You see, I am the machine gun dealer."0^ A1A4 | : :Wrongly identified defector as killer?0h "Moreover, you incorrectly identified the man who was cooperating"31r "with you as the killer. So the state will take care of him. Ha."m1| : , : "He draws a gun. BANG. You are dead."1 : "You never know that the train arrived at 12:30, right on"1 "time at Constantinople, Turkey." : , : , 1 : : v 2:*2:Subroutine to set the scenarioo2 " It is February 1923. The following note is received at"2 "Whitehall: 'If you will furnish me with a new identity and a"2 "lifetime supply of Scotch, I will give up my life of arms dealing"F3 "and will provide you with much valuable information. I will be"3 "on the Orient Express tonight. But you must contact me before"3 "the train reaches Uzunkopru or that swine dealer of Maxim machine" 4 "guns will have me killed by bandits like he did to Baron Wunster"N4 "last month.' The note is not signed."4 " You, a British agent, are assigned to take the train, rescue"4 "the defector, and arrest the killer."5 " You know there are five notorious arms dealers of different"V5& "nationalities operating in Europe under an uneasy truce as each"50 "deals in a different kind of weapon. But it is obvious that the"5: "truce has ended." : A4A5 : : : 6D "Press any key to call a taxi..." : (): : 6N:\6X:Subroutine to read meals, conversations, hazards, day, times, location6b I  : X,ME(I),CN(I),HZ(I),DA(I),TA(I),TD(I),LA$(I),LB$(I)6l I : 6v 1,0,0,0,1, 0,1430,"London","England" 7 2,1,2,0,1,1855,1919,"Calais","France"=7 3,0,1,0,1,2233,2253,"Paris (Nord)","France"p7 4,4,0,0,1,2316,2350,"Paris (Lyon)","France"7 5,4,0,1,2, 600, 620,"Vallorbe","Switzerland"7 6,0,1,0,2, 700, 707,"Lausanne","Switzerland" 8 7,3,1,1,2, 732, 734,"Montreux","Switzerland"<8 8,0,1,1,2, 919, 927,"Brig","Switzerland"m8 9,0,3,0,2,1005,1025,"Domodossola","Italy"8 10,2,2,0,2,1223,1320,"Milan","Italy"8 11,1,2,0,2,1705,1730,"Venice (S. Lucia)","Italy"9 12,0,1,0,2,1954,2014,"Trieste","(Free State)"09 13,0,1,0,2,2044,2110,"Opicina","Italy"_9 14,0,2,0,2,2119,2225,"Sezana","Slovenia"9 15,4,0,0,3, 21, 107,"Ljubljana","Slovenia"9  16,4,0,0,3, 310, 330,"Zagreb","Croatia"9 17,3,2,0,3, 900, 956,"Belgrade","Serbia" :  18,2,1,0,3,1334,1356,"Crveni Krst","Serbia"O:* 19,0,2,0,3,1555,1634,"Caribrod","Serbia"}:4 20,1,2,0,3,1856,1935,"Sofia","Bulgaria":> 21,4,0,2,4, 45, 120,"Svilengrad","Bulgaria":H 22,4,0,2,4, 406, 445,"Pithion","Greece";R 23,3,0,3,4, 505, 545,"Uzunkopru","Turkey"C;\ 24,0,0,0,4,1230, 0,"Constantinople","Turkey"K;f:};p:Subroutine to read statements of travelers;z I  : CS(I), CP(I), C$(I) : I : < 1,0,"I've heard they all have different color chalets on a north-south ridge in the Tyrol region."{< 2,0,"The Austrian said he likes the look of natural wood and would never paint his chalet."< 3,0,"They gave the waiter a difficult time. The Turk ordered beer and the other four all ordered different drinks."x= 4,0,"The Greek told me he hunts deer, but he never hunts with any of the others because they all hunt different animals."= 5,1,"My brother delivered a case of Kirsch to the green chalet. He remembers it being just south of the gaudy red chalet."T> 6,0,"The Pole asked me--can you imagine that?--if I wanted to buy any howitzers."> 7,2,"One of them asked me to cook some pheasant that he shot. He said that I should come to the yellow chalet."&? 8,1,"One time my brother said he delivered a case of Cognac to the middle chalet."? 9,0,"The Rumanian said he had the shortest distance to drive from his chalet to the railroad station at Munich."@ 10,0,"One of them bragged that his military rifles were so accurate that he bagged a fox with one of them."@ 11,0,"The man who hunts wild boar said that the pistol dealer who lives in the chalet next to his often gives loud parties."A 12,0,"The pheasant hunter complained that the arms dealer in the chalet next to his makes far too much noise testing his mortars."{A 13,0,"The gin drinker bragged that he shot sixty wart hogs on a single day last August."A 14,0,"The Rumanian said he looks out on a blue chalet."6B 15,0,"The Cognac drinker bragged that he is the best hunter and can drink more than all of the rest of them combined."B 16,0,"The one carrying the pistol said he thinks the boar's head over his neighbor's doorway is revolting."-C$ 17,0,"One of them said that one day he'd like to lob a mortar shell at the string of pheasants drying in his neighbor's yard."C. 18,0,"The Kirsch drinker said he loved the roast chicken he had to eat last night."C8 19,0,"The one carrying the pistol had a second helping of pie."7DB 20,0,"One commented that his beef dinner wasn't nearly as good as the boar that he shot last week."bDL 21,0,"The Pole asked for more soup."DV 22,0,"The one eating all the cheese mumbled that it was the same color as his chalet."E` 23,0,"The Rumanian and Austrian got completely drunk last night."fEj 24,0,"I'd like to visit the blue chalet. The owner is said to serve excellent lobster."nEt :E~ :Subroutine to read the names of those on the trainE I  : N$(I) : I : E "R. Brundt (a waiter)","C. D'Arcy (a chef)"IF "Herbert Hoover","Baron Rothschild","Guido Famadotta","Gustav Mahler"F "Robert Baden-Powell","Fritz Kreisler","Dame Melba","Gerald Murphy"F "Calouste Gulbenkian","Captain G.T. Ward","Sir Ernest Cassel"G "Major Custance","F. Scott Fitzgerald","Elsa Maxwell","Mata Hari"hG "Clayton Pasha","Arturo Toscanini","Maharajah Behar","Leon Wenger"G "Sarah Bernhardt","Arthur Vetter","Isadora Duncan","David K.E. Bruce"G :G :Subroutine to read menusH I  : MB$(I) : I : :Breakfast selectionsMH I  : MD$(I) : I : :Dinner selectionsSH H "Variete Jus de Fruits","Prunes Macerees dans le Vin"H "Demi Pamplemouse","Trois Oeufs sur le Plat","Oeufs Poches"I "Omlette aux Champagnons","Tranches de Pain Beurees et Confiturees"`I( "Galettes","Pommes-Frites","Patisseries","Croissants","Yogurt"I2 "Cafe, The, Lait, Vin, au Eau Minerale"I< "Huitres de Beernham","Cantalop glace au Marsale"IF "Compotee de Tomates Fraiches","Potage Reine":JP "La Natte de Sole au Beurre","Truite de riviere meuniere"|JZ "Poulet de grain grille a Diable","Roti de Veau a l'Osille"Jd "Truite Saumonee a la Chambord","Chaud-froid de Caneton"Jn "Chaudfroix de Langouste a la Parisienne"1Kx "Les Noisettes de Chevreuil Renaissance","Becasses a la Monaco"nK "Pointes d'asperge a la creme","Parfait de foies gras"K "Salade Catalane","Truffes au Champagne"K "Tagliatelle de carottes et courgettes","Souffle d'Anisette"!L "Creme de Caramel blond","Sorbet aux Mures de Framboisier"_L "La selection du Maitre Fromager","Corbeille de Fruits"L "Les Mignardises","Selection du vins et liquors"L :L :Subroutine to shuffle 24 integersL I M KI((I)()) : XCS(I) : CS(I)CS(K) : CS(K)X : I%M A4A5 : -M :]M :Subroutine to check for yes or no answerM (A$,)"Y" (A$,)"y" A : M (A$,)"N" (A$,)"n" A : M "Please enter Y for 'yes' or N for 'no.' Which is it";A$ :  N" :,N, :Subroutine creates a short pauseFN6 X  : X : NN@ :}NJ :Subroutine to ring buzzer and open doorNT : "Your compartment buzzer rings..."N^ : KA , : : : :Ring the buzzerOh "Press any key to open the door."Or () : : #O| :FO :Subroutine to finish eatingO , : "Press any key when you have finished eating";O A3A3(J)(X) : () : : : O :O :Subroutine to produce train noises%P : "Clackety clack...clackety clack...clackety clack"NP () : KA  }P I  : , : K  : : P KA & P K 2KAx : : : P :P :Subroutine to print time Q TT' : T$(T) : ((T$,)); TT(?Q T$(T) : " " (T$,,) ":" (T$,) " ";EQ MQ :uQ& :Subroutine to blow train whistleQ0 () Q: , : K x : : ,QD K  : : , : QN :QX :Error handling subroutineRb A5 : Rl :,Rv :End of journeynR : "Your journey has ended. Georges Nagelmackers and the"R "management of Cie. Internationale des Wagons-Lits "R "hope you enjoyed your trip on the Orient Express, the"S "most famous train in the world." : :