(figure)

THE GAME

In Marco Polo you are the leader of a group of merchants leaving on a business trip from Venice, Italy to Shang-tu, China. After sailing to Armenia at the east end of the Mediterranean Sea, you set out by camel on a 6000-mile trek across Asia to the court of the Great Kublai Khan in Shang-tu near the Pacific Ocean. To get your party safely to Shang-tu, you must know the rules of the Silk Road; the more important ones are noted here:

Many hazards and surprises await you along the road to Shang-tu, so stay alert and keep your wits about you. The Polos completed the land journey in approximately 36 months. In the game, this means arriving at Shang-tu in March 1274. If you make only the best decisions and encounter no delays, it is possible to complete the computer journey in 24 months, but a more realistic goal is to complete the trip in the same 36 months it took the Polos. Can you do it?

sample output

THE STORY

Today, a traveler flying into Venice, Italy lands at Marco Polo Airport. At the Doge's Palace in Piazza San Marco, one can view magnificent tapestries, porcelain, and jade carvings from China—the rewards of being at the western terminus of the "Silk Road" to the Far East, a route first traveled by Marco Polo in 1271.

Yet upon his return from his now famous journey to the Far East, Marco Polo's tales of strange people and far off places met with disbelief. For hundreds of years, to call something a "Marco Polo" was to label it a tall tale or even an outright falsehood. Even after they were published, his stories were thought to be largely fictional accounts. Indeed, there is little to indicate that a single one of Marco Polo's contemporaries believed much of his story. And, on his deathbed his friends pleaded with him, for the peace of his soul, to retract some of the incredible statements made in his book. Instead, he refused and is said to have replied, "I have not told half of what I saw."

As his accounts were set down many years before the development of printing, the volumes were copied by hand, and variations in wording and numerous embellishments crept into the work.

In all, more than 100 different manuscripts were produced—some in Italian, some in Latin, and some in French. The earliest printed edition is dated 1559, and an English translation did not appear until 1818.

Not until the late 1800's did scholars attempt to piece together a truly original edition, as reports from later travelers and explorers began to indicate that the majority of Marco Polo's accounts were accurate and unexaggerated. Unfortunately, not one edition treating the entire work as a travel narrative has ever appeared, nor has the story ever been translated into contemporary English. Thus, to this day, for most Americans, the myths and the realities remain intertwined.

Marco Polo was born in Venice in 1254, son of Niccolò, one of the great merchants and noblemen of the city. An uncle, Maffeo, worked directly with his father, and together the team of brothers traveled to many distant lands.

Niccolò Polo and his brother Maffeo made their first great journey east in 1260. They visited their third brother in Constantinople and from there set out on a trading trip along the Tigris River to the great city of Bokhara in the Persian Empire (today, the city of Bukhara is in south central Russia). There they met an ambassador of the Great Khan (Supreme Lord), Kublai, son of the conquering Gengis Khan, who lived at the eastern extremity of the continent in Shang-tu (today, the inconsequential town of Shangdu about 200 miles northwest of Beijing, China).

Kublai Khan had never seen a native of Italy and requested an audience with the two brothers. Convinced that they had no choice in the matter, the brothers made an incredible year-long journey across Tibet and Mongolia to the eastern-most part of the Empire of the Great Khan (Cathay, or China).

As the first Europeans to set foot in the court of the Great Khan, they were entertained with feasts and plied with extravagant gifts. Kublai Khan questioned the brothers at length and became convinced that his Empire could benefit greatly from European learning (although, it should be mentioned, the Khanates were in many respects better governed and more civilized than much of Europe at that time). Consequently, Kublai Khan asked the brothers to relay to the Pope a request for 100 men of learning who could be stationed throughout his extensive empire to disseminate the best of Western culture.

The Silk Road ran 6000 miles across Asia

Although furnished with escorts, provisions, and everything necessary for their return journey, the Polos remained subject to the hazards of travel—extreme cold, snow, floods, deserts, and diseases—and it was three years before they reached the seaport of Laissus in Armenia and set sail for Venice.

Back in Italy, they found that Pope Clement IV had just died.

Two years passed before they could relay the Khan's request to the new Pope, Gregory X, who, instead of furnishing 100 men of learning, dispatched two friars of the Order of Preachers to accompany the Polos on their return trip. Having heard accounts of warring tribes along the route, the friars feared for their lives and, after just a few days' journey, turned back. This was not the only time this happened; as H.G. Wells in The Outline of History reports, "This abortive mission was only one of a number of attempts to communicate, and always they were feeble and feeble-spirited attempts, with nothing of the conquering fire of the earlier Christian missions."

Manuel Komroff in The Travels of Marco Polo goes further. "A hundred cultured men living in China at this time and returning home at various periods would have changed the course of human events. Europe was just awakening from a long, barbaric sleep, while China was already cultured in many fields. Marco Polo came to exchange merchandise, while 100 cultured men would have returned to exchange ideas. It is the traffic of ideas that is of greater profit to humanity."

On the second journey, the two Polo brothers decided to bring Niccolò's 16-year-old son, Marco, along. Marco was, first and foremost, a merchant, and much of his journals discuss trade, finance, risk, and profit. He also had an eye for nature and described many varieties of birds, trees, and other plants and animals. But beyond the realms of commerce and nature he was largely without vision and simply reported what he saw in a matter-of-fact style with little analysis of the underlying whys and wherefores.

The second journey of the Polos resembled the first—the main difference being the eyewitness account provided by young Marco's notes. As mentioned, these notes are not in the form of a travel narrative, but rather a description of things and places. Moreover, in setting down his account, Marco rearranged his notes to tell of a country (or city) and its immediate neighbors, thus making it difficult to define the actual route taken.

However, by comparing Marco's accounts with other historical information, excavations, and legends, historians have accurately reconstructed the route of this second legendary journey. Rather than starting in Constantinople, the second journey started in the port of Laissus in Lower Armenia (today, near Adana in south central Turkey). From there the travelers headed northeast along the Euphrates River and then turned southward along the Tigris River to Babylon (Baghdad) and continued on south to the Persian Gulf.

From there they continued south to Hormuz, where the caravan turned almost due north to cross the Dasht-e Lut and Dasht-e Kavir desert regions of Persia to Herat (then in the Khanate of Persia, today in Afghanistan). Next they followed a difficult trek across the mountains of Afghanistan, skirting north of Kashmir to Kashgir, the capital city of the Khanate of Chaghadai (today, Kashi, China).

Continuing in the mountains, the Polos then descended and crossed the narrowest part of the desert of Lop, which took a month. As Marco described, "During these days the journey is invariably over either sandy plains or barren mountains. In this tract, neither beasts or birds are met with, because there is no kind of food for them." He also described "excessive troubles and dangers that must unavoidably be encountered" such as mirages, malevolent spirits, eerie noises, and the danger of losing the path. This is one of the only places in which Marco Polo discussed the dangers of the route, so it must be supposed that they made a great impression on him. To this day this bone-strewn and barren waste has been crossed by very few travelers, and it remains one of the most desolate regions of the world.

The caravan then continued into the province of Tanguth in the Khanate of the Great Khan along what is today the border of Tibet (Xizang) and Sinkiang (Xinjiang). They continued generally eastward, veering off to the north before reaching Xian, the legendary eastern terminus of the Silk Road. The northern route followed the Yellow River for 550 miles, but unfortunately it also obliged the Polos to cross a portion of the Gobi Desert to reach Shang-tu. Marco did not dwell as long on the Gobi Desert as he did on the Lop, although he did mention that one must "lay in provisions for at least 40 days because that space of time is employed in traversing the desert, where there is not any appearance of a dwelling, nor are there any inhabitants."

Finally, after traveling for three and a half years, the Polos arrived in the court of the Great Khan and bowed low before the emperor. In place of 100 learned men, they had with them a few letters from the new Pope, a little sacred oil from the Holy Land, and a few items to trade. By this time Marco was 21, the year, 1275.

Kublai Khan took a liking to Marco Polo, who at once applied himself to learning the written and spoken languages of the country. The Emperor, seeing that the young man was both clever and tactful, began to send him on public missions to other parts of the empire.

Marco Polo had observed that the Khan was often bored by the dry reports of his administrators but enjoyed hearing about the manners and oddities of people in other regions. Thus Marco started to keep small notebooks of strange facts that were likely to amuse and interest Kublai Khan. It was from these notebooks that Marco eventually transcribed the account of his travels back in Italy.

The Polos prospered in the court of Kublai Khan, and the Khan became very attached to them. Although they wanted to return to Italy, the Khan apparently felt that in a small way they were serving in place of the 100 men he had requested and declined to let them go.

However, 20 years later the Khan of Persia lost his favorite wife and asked Kublai Khan to send him another from the same Mongol tribe from which she had come. The Polos, who were expert navigators, proposed to the Khan that they be allowed to pilot the ships that would carry the party to Persia. Reluctantly, the Khan consented.

The Polos exchanged all their acquired possessions for jewels and set sail on a long and dangerous two-year voyage through the South China Sea and the Indian Ocean to Persia.

A year later, after having left the spectacular court of Kublai Khan, Niccolò, Maffeo, and Marco Polo arrived in their old home, Venice. Their clothes were tattered and foreign, their faces reflected the ravages of travel, and they had practically forgotten their native tongue. They had long been thought dead, and the distant relatives occupying their house refused to admit them after their absence of 26 years.

They finally succeeded in convincing their kindred that they were not imposters, and a great feast was arranged. All their old friends and relatives were invited. The Polos dressed in new velvet and damask garments for the meal, but when the table had been cleared and all the servants asked to leave, Marco Polo produced the coarse, shabby costumes they had worn on their arrival. Then, taking sharp knives, they ripped the seams and let fall to the table quantities of rubies, sapphires, diamonds, pearls, and other jewels. The guests were amazed and dumbfounded, the story spread, and the Polos became the most illustrious merchants of Venice.

Because the Polos were merchants, they immediately set themselves up in business and again began to trade. At the time, there were fierce rivalries among the great Italian merchant cities of Venice, Pisa, and Genoa. These rivalries had reached the point of open warfare, and most merchant families maintained one or more war galleys to protect their harbors and trading ships from both pirates and truculent rivals.

In a major battle, the Venetian and Genoese fleets met on September 7, 1298, just three years after the Polos' return from the Far East. In the battle, the Genoese captured the entire Venetian fleet and took 7000 Venetians, including Marco Polo, prisoner. Most were released in exchange for ransom, but the Genoese refused to release Marco Polo.

Thus, in a Genoese jail, Marco Polo dictated the notes of his travels to a fellow prisoner, Rusticien, a scribe from Pisa, and they were set down on parchment. Within a year, the merchant war between Venice and Genoa was over, Marco Polo was released, and the world got its first, disbelieving glimpse of the strange and fascinating land of Asia.

BIBLIOGRAPHY

Fairbank, J. K., Reischauer, E. O., and Craig, A. M. East Asia: Tradition and Transformation. Boston: Houghton Mifflin, 1973.

Komroff, Manuel. The Travels of Marco Polo. New York: The Modern Library, 1953.

Wells, H. G. The Outline of History: A Plain History of Life and Mankind. Boston: Doubleday, 1971.

THE PROGRAM

The Marco Polo program consists of a very short main program that simply calls a series of ten major subroutines. Ten shorter subroutines perform frequently used operations such as checking for a yes/no answer or centering a printed line. The program uses the same framework as the Westward Ho! program which includes extensive program notes; hence these notes describe only those sections that are unique. Both the subroutine to deal with the purchase of initial supplies (Lines 720–880) and the one to deal with bartering for supplies along the way (Lines 1190–1380) require the player to specify quantities of six items. These quantities must be in a range, the lower limit of which is usually zero and the upper limit of which is defined by the number of jewels the player has. Hence, before each INPUT statement, the upper limit is set:

A2 = (INT(JL / RN))

in which A2 is the upper limit, JL is the number of jewels, and RN is the cost of the item. The cost is a random function which varies over a small range. After setting the limit, an INPUT statement gets the answer, following which a subroutine (Lines 3790–3820), which checks to see if the answer is within the acceptable range, is called. If not, a message saying, "That is too few" or "That is too many," is printed and the input request is stated again.

Consider the expression in Line 1580:

FR = INT(.5 + 10 * (F - FE)) / 10

The purpose of this expression is to calculate a fractional value (to 1/10) of the food reserve (FR), which is food (F) less food eaten (FE). This function is necessary because the computer may not calculate fractional values absolutely correctly (2/5 may come out 0.40000001, for example) and we do not want to print these extraneous digits or, worse yet, compound the error as the program proceeds. Because the integer (INT) function actually truncates the decimal places, it is necessary to add 0.5 to ten times the number to retain the correct decimal value. Try calculating the value of FR with and without the 0.5 for values of F–FE equal to 3.299999 and 3.300001.

Another expression frequently used in the program is found at Line 2160:

IF FC = 1 THEN X$ = "" ELSE X$ = "S"

This is used when printing the reference to an item, in this case sacks of food, that could have a value of zero, one, or more. When printing, we want the singular or plural form of the item to correspond to the numeric value, i.e., "I sack" and "2 sacks." Thus, the PRINT statement uses the string X$ as follows:

PRINT "You'll have to sell" FC "sack" X$ "of food

Notice the spacing. When a numeric value (FC) is printed, it is automatically preceded and followed by a space; thus, we enclose no spaces in the quotes on either side of a numeric value. However, a string (X$) has no automatic spaces and because we want a space following the word "sack" or "sacks," we leave a space inside the quotes following X$.

Compare the method of reading the probabilities of events occurring in this program (Lines 3570–3580) with that in Westward Ho! (Lines 3710–3720). The effect is the same, but the Marco Polo approach makes it easier to change the probabilities.

3570 FOR I = 1 TO 14 : READ A : EPT = EPT + A : EP(I) = EPT : NEXT I
3580 DATA 6, 4, 4, 6, 6, 6, 6, 4, 4, 1, 6, 8, 18, 10

The probability of the first event occurring is arbitrarily set to 6. The next event is only two-thirds as likely to happen as the first; it is assigned a value of four. The 13th event is three times as likely to happen as the first; it is assigned a value of 18.

The cumulative value of these events is then read into the array EP. EP(1) = 6, EP(2) = 6 + 4 or 10, EP(3) = 14, and so on.

The function in Line 1950 determines which event occurs:

RN = INT(EPT * RND(1))

This function selects a value between 1 and EPT. If RN is between 1 and 6, event 1 occurs; between 6 and 10, event 2; between 10 and 14, event 3; and so on.

The function in Westward Ho! does the same thing but it requires you to calculate in advance the value of EPT and all the values of EP(n). Consequently, it is not nearly as easy to see the relationship between various events. Nor is it as easy to change things around, because changing one value at the beginning of the list will affect all later values.

The shooting subroutines in Marco Polo (Lines 3620–3700) and Westward Ho! are also very similar. First, a random shooting word (SPLAT, TWACK, etc.) is selected in Line 3630 which you are directed to type. Then, the current time (in seconds) is read from the real-time clock of the computer in Line 3640; this is the starting time. An INPUT statement in Line 3650 accepts your typed word which is then compared with the requested word. If the two words match, the ending time is read from the real-time clock, the starting time subtracted from it, and the resulting elapsed time is used to calculate your ranking as a marksman.

If the word you entered did not match the requested word (the comparison is done in uppercase), the routine then checks to see whether you might have typed the word in lowercase letters. Lines 3660–3670 convert the letters of the requested word. If there is still no match, you are told, "That's not it. Try again."

At the beginning of the program when you were asked to rank your shooting ability (Lines 600–700), the number that you input (HX) effectively becomes the number of seconds you have to type the requested shooting word in order to be ranked as an excellent marksman. Hence, if you claimed to be able to "hit a charging boar at 300 paces," in order to hit a bandit or animal dead center, you will have to type the correct word in one second or less. Actually, because of the way the real-time clock works, the allowable time may be as much as 1.99 seconds. Of course, you can "cheat" and rank yourself as a poor marksman (which will give you more time to type the correct word), but doing so makes the game less challenging and fun.

Many of the shorter subroutines are explained in the program notes in the next three chapters. Be sure to read them if you are having trouble understanding how anything works in this program.

PROGRAM VARIABLES

A	Answer to input query, numeric
A$	Answer to input query, string
A1, A2	Upper and lower limit to input answer
B	Beasts (camels)
BA	Beast quality
BL	Beast load capacity
BSK	Beast sickness indicator
C	Clothes (changes)
CZ	No clothes indicator
D	Distance (miles per trip segment)
DT	Distance, total
DZ	Desert indicator
EP(n)	Event probabilities (n = 1, 14)
F	Food (sacks)
FA$(n)	Food, names of animals for hunting
FC	Food carrying capacity of beast
FE	Food eaten on current trip segment
FP	Food eaten on previous trip segment
FQ	Food quality on current and previous trip segment
FR	Food reserve
HX	Hunting expertise level
I	Iteration variable
J	Trip segments (2-month periods)
K	Iteration variable
JL	Jewels
L	Oil (skins)
M	Medicines (bottles of balm)
MO	Month
MO$(n)	Month name (n = -1, 6)
PFD	Person food indicator
PSK	Person sickness indicator
PSKT	Person sickness total
PWD	Person wound indicator
PWDT	Person wounds total
R	Rate of speed
RN	Random number variable
S$(n)	Shooting words (n = 1, 4)
S1, S2	Shooting timer start and stop
SR	Shooting response
W	Weapons (crossbow arrows)
X$	Temporary string variable
XA$	Temporary string variable
YR	Year

PROGRAM LISTINGS

Download MARCO.BAS (tokenized BASIC format)

100 CLS : KEY OFF
110 LOCATE 10, 1 : X$ = "The Journey of Marco Polo, 1271" : GOSUB 3760
120 LOCATE 13, 1 : X$ = "(c) David H. Ahl, 1986" : GOSUB 3760
130 LOCATE 23, 1 : GOSUB 3720 : CLS
140 DIM EP(20)
150 JL = 300 : C = 2 : W = 30 : M = 5 : FP = 5 : BSK = 99 : 'Initial quantities of stuff
160 GOSUB 360 : GOSUB 3560 : 'Display the scenario
170 WHILE RN > 32767 : RN = RN - 65535! : WEND : RANDOMIZE RN
180 PRINT : GOSUB 720 : 'Purchase initial supplies
190 GOSUB 600 : 'Input hunting skill level
195 X$ = "Press any key to begin your trek!" : GOSUB 3760 : GOSUB 3740 : PRINT
200 '
210 'Main program
220 J = J + 1 : GOSUB 3510 : 'Next two-month segment
230 DT = DT + D : IF DT > 6000 THEN 3360 : 'Reached end of trip?
240 D = 40 + BA * 20 + INT(100 * RND(1)) : PRINT "You have traveled" DT "miles."
245 PRINT "Here is what you now have :" : GOSUB 3200
250 GOSUB 910 : 'Check for no jewels or clothes
260 GOSUB 1020 : 'Check for sickness
270 IF BSK = J THEN BSK = 99 : BL = B : BA = BA + 1 : 'Camel recover yet?
280 IF J > 1 AND JL > 1 THEN GOSUB 1190 : 'Barter for supplies
290 IF C = 0 THEN GOSUB 1400 : 'No clothes?
300 GOSUB 1500 : 'Eating routine
310 IF DZ = 0 AND RND(1) < .18 THEN GOSUB 3020 : '18% chance to hunt for food
320 PRINT : GOSUB 1780 : 'Desert sections
330 IF DZ = 0 THEN GOSUB 1940 : 'Event happens
340 GOSUB 3110 : GOTO 220
350 '
360 'Subroutine to print initial scenario
370 X$ = "The Journey of Marco Polo-1271" : GOSUB 3760 : PRINT : PRINT
380 PRINT " Starting from Venice in 1271 you travel by sailing ship to the"
390 PRINT "port of Armenia. Upon arrival, you prepare for a 6000-mile trek to"
400 PRINT "the court of the Great Kublai Khan in Shang-tu, Cathay. Having set"
410 PRINT "aside" JL "precious jewels to finance your planned 3-year trip, you"
420 PRINT "must barter for the following supplies in Armenia :"
450 PRINT " * Camels (Sturdier animals will cost more. You will probably"
460 PRING " want 8 to 10 camels to carry your many supplies.)"
470 PRINT " * Food (You must barter for food as you travel along. However,"
480 PRINT " prices tend to be lower in port cities, so you should pack"
490 PRINT " in a good supply at the start.)
500 PRINT " * Oil for lamps and cooking (Over much of the trip, you will be"
510 PRINT " able to use wood to build fires. However, in the Persian,"
520 PRINT " Lop, and Gobi deserts you will need oil.)" : PRINT
522 PRINT " From Venice you have also packed clothing, weapons (crossbows),"
524 PRINT "and medicines (balms and unguents); however, your provisions will be"

530 PRINT "depleted as you go along and you must replenish them. The selection"
540 PRINT "and price of supplies is quite different in various regions, so you"
550 PRINT "must barter wisely. As a merchant, you are not skilled in fishing"
560 PRINT "or hunting, although occasionally you might be able to try to get"
570 PRINT "some food in this way."
580 GOSUB 3720 : PRINT : RETURN
590 '
600 'Subroutine to initialize hunting skill level
610 S$(1) = "SPLAT" : S$(2) = "SPRONG" : S$(3) = "TWACK" : S$(4) = "ZUNK"
620 FA$(1) = "wild boar" : FA$(2) = "big stag" : FA$(3) = "black bear"
625 PRINT : PRINT "Before you begin your journey, please rank your skill with"
630 PRINT "the crossbow on the following scale:"
640 PRINT " (1) Can hit a charging boar at 300 paces"
650 PRINT " (2) Can hit a deer at 50 paces"
660 PRINT " (3) Can hit a sleeping woodchuck at 5 paces"
670 PRINT " (4) Occasionally hit own foot when loading
680 INPUT "How do you rank yourself";HX
690 IF HX > 1 AND HX < 5 THEN PRINT : RETURN
700 PRINT "Please enter 1, 2, 3, or 4" : GOTO 680
710 '
720 'Subroutine to get initial supplies
730 PRINT " After three months at sea, you have arrived at the seaport of"
740 PRINT "Laiassus, Armenia. There are many merchants in the port city and"
750 PRINT "you can easily get the supplies you need. Several traders offer you"
760 A1 = 17 : A2 = 24 : PRINT "camels at prices between" A1 "and" A2 "jewels each."
770 INPUT "How much do you want to pay for a camel";A : GOSUB 3790 : BA = A
780 PRINT "You will need at least 7 camels, but not more than 12."
790 A1 = 7 : A2 = 12 : INPUT "How many camels do you want to buy";A : GOSUB 3790
800 B = A : JL = JL - BA * B : A2 = 3 * B - 6 : 'Camels—number, cost, amount they can carry
810 PRINT " One large sack of food costs 2 jewels. You will need at least"
820 PRINT "8 sacks to get to Babylon (Baghdad); you can carry a maximum of" A2
830 A1 = 8 : INPUT "sacks. How many do you want";A : GOSUB 3790
840 F = A : JL = JL - A * 2 : A2 = 3 * B - A : 'Food & cost, amount of oil camels can carry
850 PRINT " A skin of oil costs 2 jewels each. You should have at least 6"
860 PRINT "full skins for cooking in the desert. Your camels can carry" A2
870 A1 = 5 : INPUT "skins. How many do you want";A : GOSUB 3790
880 BL = B : L = A : JL = JL - 2 * L : 'Oil-amount and cost : return
900 '
910 'Subroutine to check for being out of jewels and clothes
920 IF JL > 15 THEN 980 : 'Still have a few jewels?
930 PRINT "You have only" JL "jewels with which to barter." : IF B > 2 THEN 950
940 PRINT "You push on with your" B "camels." : RETURN
950 INPUT "Would you like to sell a camel";A$ : GOSUB 3840 : IF A$ = "N" THEN 940
960 RN = INT(8 + 9 * RND(1)) : PRINT "You get" RN "jewels for your best camel."
970 JL = JL + RN : B = B - 1 : BL = BL - 1 : 'Add jewels, subtract camel

980 IF C > 0 THEN RETURN : 'Have some clothes?
990 PRINT "You should try to replace that tent you have been wearing as a"
1000 PRINT "robe. It is badly torn and the Tartars find it insulting." : RETURN
1010 '
1020 'Subroutine to deal with sickness
1030 IF PSK > 0 THEN PSKT = PSKT + PSK : PSK = 0 : 'Sickness total
1040 IF PWD > 0 THEN PWDT = PWDT + PWD : PWD = 0 : 'Injuries total
1050 IF FE = 3 THEN PFD = PFD + .4
1060 IF PSKT + PWDT + PFD < 3 THEN RETURN
1070 IF RND(1) > .7 THEN RETURN : '70% chance of delay due to recurring illness
1080 PRINT "As a result of sickness, injuries, and poor eating, you must stop"
1090 PRINT "and regain your health. You trade a few jewels to stay in a hut."
1100 RN = INT(1 + 3.2 * RND(1)) : IF RN > 3 THEN 1160 : '6% chance of dying
1110 PRINT "You grow steadily stronger, but it is" RN * 2 "months until you"
1120 PRINT "are again fit to travel." : PSKT = 0 : PWDT = 0 : PFD = 0 : J = J + RN
1130 M = INT(M / 2) : F = F / 2 : IF F < 3 THEN F = 3
1140 IF JL > 20 THEN JL = JL - 10 ELSE JL = INT(JL / 2) : 'Costs money for lodging
1150 GOSUB 3510 : RETURN
1160 FOR I = 1 TO 2500 : NEXT : PRINT "You stay for" RN "months but grow"
1170 PRINT "steadily weaker and finally pass away." : J = J + RN : GOTO 3320
1180 '
1190 'Subroutine to barter for supplies
1200 PRINT "You have" JL; : INPUT "jewels. Do you want to barter here";A$
1210 GOSUB 3840 : IF A$ = "N" THEN 1380
1220 RN = INT(17 + 8 * RND(1)) : PRINT "Camels cost" RN "jewels here. ";
1230 A1 = 0 : A2 = INT(JL / RN) : INPUT "How many do you want";A : GOSUB 3790
1240 B = B + A : BL = BL + A : BA = BA - A : 'Lower quality animals along route
1250 JL = JL - A * RN : RN = INT(2 + 4 * RND(1)) : PRINT "Sacks of food cost" RN "jewels. ";
1260 A2 = (INT(JL / RN)) : INPUT "How many do you want";A : GOSUB 3790 : F = F + A
1270 IF F + L > 3 * BL THEN PRINT "Camels can't carry that much." : F = F - A : GOTO 1260
1280 JL = JL - A * RN : RN = INT(2 + 4 * RND(1)) : PRINT "Skins of oil cost" RN "jewels. ";
1290 A2 = (INT(JL / RN)) : INPUT "How many do you want";A : GOSUB 3790 : L = L + A
1300 IF F + L > 3 * BL THEN PRINT "Camels can't carry that much." : L = L - A : GOTO 1290
1310 JL = JL - A * RN : RN = INT(8 + 8 * RND(1)) : PRINT "A set of clothes costs" RN;
1320 A2 = (INT(JL / RN)) : INPUT "jewels. How many do you want";A : GOSUB 3790
1330 C = C + A : JL = JL - A * RN : PRINT "You can get a bottle of balm for 2 jewels. ";
1340 A2 = JL / 2 : INPUT "How many do you want";A : GOSUB 3790 : JL = JL - 2 * A : M = M + A
1350 A2 = JL : RN = INT(6 + 6 * RND(1)) : PRINT "You can get" RN "arrows for 1 jewel."
1360 INPUT "How many jewels do you want to spend on arrows";A : GOSUB 3790
1370 JL = JL - A : W = W + RN * A : IF C > 1 THEN CZ = 0
1380 PRINT : PRINT "Here is what you now have:" : GOSUB 3200 : RETURN
1390 '
1400 'Subroutine to deal with no clothes
1410 PRINT : PRINT "You were warned about getting more modest clothes."
1420 PRINT "Furthermore, your sandals are in shreds." : IF CZ = 1 THEN 1470

1430 PRINT "The Tartars chase you from town and ";
1440 IF RND(1) > .2 THEN PRINT "warn you not to return." : CZ = 1 : RETURN
1450 PRINT "stone you." : PRINT "You are badly wounded and vow to get";
1460 PRINT "new clothes as soon as possible." : PWD = 1.5 : CZ = 1 : RETURN
1470 PRINT "Word has been received about your disreputable appearance.
1480 PRINT "The people are not willing to deal with you and they "; : GOTO 1450
1490 '
1500 'Subroutine to eat
1510 IF F < 3 THEN GOSUB 1650 : 'Out of food?
1520 PRINT "On the next stage of your journey, how do you want to eat :"
1530 PRINT " (1) Reasonably well (can walk further; Less chance of sickness)"
1540 INPUT " (2) Adequately, or (3) Poorly";A : IF A > 0 AND A < 4 THEN 1560
1550 PRINT "That's not a choice. Now then, (1) Well,"; : GOTO 1540
1560 FE = 6 - A : IF FE <= F THEN 1580
1570 PRINT "You don't have enough food to eat that well. Try again." : GOTO 1520
1580 FR = INT(.5 + 10 * (F - FE)) / 10 : IF FR > 3 THEN 1630
1590 IF FR = 1 THEN X$ = "" ELSE X$ = "s"
1600 PRINT "Your food reserve will then be just" FR "sack" X$ : IF A = 3 THEN 1630
1610 INPUT "Do you want to change your mind about how much you will eat";A$
1620 GOSUB 3840 : IF A$ = "Y" THEN 1520
1630 F = F - FE : D = D - (A - 1) * 50 : FQ = FP + FE : FP = FE : RETURN
1640 '
1650 'Out of food section
1660 PRINT "You don't have enough food to go on."
1670 IF JL < 15 THEN 1730
1680 PRINT "You should have bought food at the market. Now it will cost you"
1690 RN = INT(5 + 4 * RND(1)) : PRINT RN "jewels per sack."; : A1 = 1 : A2 = (INT(JL / RN))
1700 INPUT " How many sacks do you want";A : GOSUB 3790
1710 F = F + A : JL = JL - A * RN : IF F >= 3 THEN RETURN
1720 PRINT "You still don't have enough food and there is nothing to hunt."
1730 IF B < 1 THEN 1760 ELSE INPUT "Do you want to eat a camel";A$
1740 GOSUB 3840 : IF A$ = "N" THEN 3280 ELSE B = B - 1 : RN = INT(3 + 2 * RND(1)) : F = F + RN
1750 PRINT "You manage to get about" RN "sacks of food out of it." : RETURN
1760 PRINT "You don't even have a camel left to eat." : GOTO 3280
1770 '
1780 'Subroutine for desert sections
1790 DZ = 0 : IF DT < 2100 OR DT > 5900 THEN RETURN : 'No desert at far ends
1800 IF DT > 2600 AND DT < 4100 THEN RETURN : 'Tigris River Valley
1810 IF DT > 4600 AND DT < 5400 THEN RETURN : 'No desert in middle
1820 IF DT < 4100 THEN X$ = "Dasht-e-Kavir (Persian)" : GOTO 1840
1830 IF DT > 5399 THEN X$ = "Gobi (Cathay)" ELSE X$ = "Taklimakan (Lop)"
1840 PRINT "You are in the " X$ " desert."
1850 IF L >= 3 THEN L = L - 3 : PRINT "Use 3 skins of oil for cooking." : GOTO 1900
1860 PRINT "You ran out of oil for cooking."
1870 IF L > 1 THEN IF RND(1) > .5 THEN L = 0 : GOTO 1900

1880 PRINT "You get horribly sick from eating raw and undercooked food."
1890 L = 0 : PSK = 1 : D = D - 80 : M = M - 1
1900 ON INT(1 + 7 * RND(1)) GOSUB 2250, 2310, 2420, 2450, 2480, 2510, 1920
1910 DZ = 1 : GOSUB 3110 : RETURN
1920 PRINT "You get through this stretch of desert without mishap!" : GOTO 1910
1930 '
1940 'Subroutine to deal with special events
1950 RN = INT(EPT * RND(1)) : FOR I = 1 TO 14 : 'Iterate thru possible events
1960 IF RN > EP(I) THEN NEXT I : I = 14 : 'If event happened, exit lop
1970 IF I > 10 THEN 1990
1980 ON I GOTO 2000, 2250, 2310, 2340, 2360, 2380, 2400, 2420, 2450, 2480
1990 ON I - 10 GOTO 2540, 2570, 2600, 2660
2000 PRINT "A camel injures its leg. Do you want to (1) Nurse it along or"
2010 INPUT "(2) Abandon it, or (3) Sell it";A
2020 IF A = 1 THEN 2040 ELSE IF A = 2 THEN 2050 ELSE IF A = 3 THEN 2090
2030 PRINT "That is not a choice. Answer (1) to Nurse it along, " : GOTO 2010
2040 BSK = J + 2 : GOSUB 2120 : RETURN
2050 B = B - 1 : GOSUB 2120 : FC = 3 * BL - F - L : IF FC <= 0 THEN RETURN
2060 PRINT "You kill the camel for food." : IF FC > 2 THEN FC = 3
2070 F = F + FC : IF FC = 1 THEN X$ = "" ELSE X$ = "s"
2080 PRINT "You get the equivalent of" FC "sack" X$ " of food." : RETURN
2090 B = B - 1 : PRINT "It is a poor beast and you can get only 10 jewels for it."
2100 JL = JL + 10 : GOSUB 2120 : RETURN
2110 '
2120 'Exceed load carrying capacity of camels?
2130 BL = B : IF BSK <= J THEN BL = B - .6 : BA = BA - 1 : 'If sick camel reduce load, speed
2140 IF F + L <= 3 * BL THEN RETURN
2150 PRINT "You have too large a load for your camels." : FC = INT(F + L - 3 * BL + .9)
2160 IF FC = 1 THEN X$ = "" ELSE X$ = "s"
2170 PRINT "You'll have to sell" FC "sack" X$ " of food or skin" X$ " of oil."
2180 FS = INT(FC / 2) : LS = FC - FS : 'How much to sell of food and oil
2190 IF LS > L THEN LS = LS - 1 : FS = FS + 1 : GOTO 2190
2200 IF FS > F THEN FS = FS - 1 : LS = LS + 1 : GOTO 2200
2210 F = F - FS : L = L - LS : JL = JL + FS + LS : 'Decrease food and oil, add jewels
2220 PRINT "You sell" FS "of food," LS "of oil for which you get only";
2230 PRINT FS + LS "jewel" X$ "." : RETURN
2240 '
2250 PRINT "One of your camels is very sick and can't carry a full load."
2260 INPUT "Want to (1) Keep it with you, (2) Slaughter it, or (3) Sell it";A
2270 IF A = 1 THEN 2290 ELSE IF A = 2 THEN 2050 ELSE IF A = 3 THEN 2090
2280 PRINT "That is not a choice. Again, please." : GOTO 2260
2290 BSK = J + 2 : GOSUB 2120 : RETURN
2300 '
2310 PRINT "Long stretch with bad water. Costs time to find clean wells."
2320 D = D - 50 : RETURN

2330 '
2340 PRINT "You get lost trying to find an easier route." : D = D - 100 : RETURN
2350 '
2360 PRINT "Heavy rains completely wash away the route." : D = D - 90 : RETURN
2370 '
2380 PRINT "Some of your food rots in the humid weather." : F = F - 1 : RETURN
2390 '
2400 PRINT "Marauding animals got into your food supply." : F = F - 1 : RETURN
2410 '
2420 PRINT "A fire flares up and destroys some of your food and clothes."
2430 F = F - .4 : C = C - 1 : GOSUB 3110 : IF L < 1 THEN RETURN ELSE L = L - .5 : RETURN
2440 '
2450 PRINT "Two camels wander off. You finally find them after spending"
2455 PRINT "several days searching for them."
2460 D = D - 20 : RETURN
2470 '
2480 PRINT "You get a nasty burn from an oil fire."
2490 PWD = .5 : GOSUB 2840 : RETURN
2500 '
2510 PRINT "High winds, sand storms, and ferocious heat slow you down."
2520 D = D - 70 : RETURN
2530 '
2540 PRINT "A gash in your leg looks infected. It hurts like the blazes."
2550 GOSUB 2840 : D = D - 50 : PWD = .7 : RETURN
2560 '
2570 PRINT "Jagged rocks tear your sandals and clothing. You'll have to get"
2580 PRINT "replacements as soon as you can." : C = C - 1 : D = D - 30 : RETURN
2590 '
2600 RN = RND(1) * FQ : IF RN < 2 THEN 2610 ELSE IF RN < 3.5 THEN 2630 ELSE RETURN
2610 PRINT "All of you have horrible stomach cramps and intestinal disorders"
2620 PRINT "and are laid up for over a month." : D = D - 275 : RETURN
2630 PRINT "You're running a high fever and your muscles feel like jelly."
2640 PRINT "Your party slows down for you." : PSK = .7 : D = D - 125 : RETURN
2650 '
2660 PRINT "Blood-thirsty bandits are attacking your small caravan!"
2670 PRINT "You grab your crossbow…"; : GOSUB 3620
2680 IF W > 5 THEN 2700 ELSE PRINT "You try to drive them off, but you run out"
2690 PRINT "of arrows. They grab some jewels and food." : F = F - 1 : GOTO 2720
2700 IF SR <= 1 THEN 2810 ELSE IF SR <= 3 THEN 2780
2710 PRINT "Better stick to trading; your aim is terrible."
2720 IF RND(1) > .8 THEN 2750 : '80% chance of surviving attack
2730 PRINT "They are savage, evil barbarians — they kill you and take"
2740 PRINT "your remaining camels and jewels." : JL = 0 : B = 0 : GOTO 3320
2750 PRINT "You caught a knife in the shoulder. That's going to take quite"
2760 PRINT "a while to heal." : GOSUB 2840

2770 PWD = 1.5 : JL = JL - 10 : W = W - 4 - 2 * SR : GOSUB 3110 : RETURN
2780 PRINT "With practice you could shoot the crossbow, but most of your shots"
2790 PRINT "missed. An iron mace got you in the chest. They took some jewels."
2800 PWD = 1 : JL = JL - 5 : GOSUB 2840 : W = W - 3 - 2 * SR : GOSUB 3110 : RETURN
2810 PRINT "Wow! Sensational shooting. You drove them off with no losses."
2820 W = W - 4 : RETURN
2830 '
2840 'Subroutine to deal with using balm
2850 RN = INT(1 + 2 * RND(1)) : IF RN > 1 THEN X$ = "s" ELSE X$ = ""
2860 IF RND(1) > .5 THEN XA$ = "balm" ELSE XA$ = "unguent"
2870 M = M - RN : IF M < 0 THEN M = 0 : GOTO 2890
2880 PRINT "You use" RN "bottle" X$ " of " XA$ " treating your wound." : RETURN
2890 PRINT "You need more " XA$ " to treat your wound." : IF JL < 8 THEN 2940
2900 PRINT "Fortunately, you find some nomads who offer to sell you 2 bottles"
2910 PRINT "of" XA$ "for the outrageous price of 4 jewels each."
2920 INPUT "Do you want to buy it";A$ : GOSUB 3840 : IF A$ = "N" THEN 2950
2930 PRINT "It works well and you're soon feeling better." : M = 0 : JL = JL - 8 : RETURN
2940 PRINT "But, alas, you don't have enough jewels to buy any."
2950 PRINT "Your wound is badly infected, "; : IF RND(1) < .8 THEN 3000
2960 PRINT "but you keep going anyway." : PRINT
2970 PRINT "Unfortunately, the strain is too much for you and, after weeks of"
2980 PRINT "agony, you succumb to your wounds and die in the wilderness."
2990 GOTO 3320
3000 PRINT "but you push on for the next village." : PWD = 3 : RETURN
3010 '
3020 'Subroutine to hunt for food
3030 IF W < 15 THEN PRINT "You don't have enough arrows to hunt for food." : RETURN
3040 PRINT "There goes a " FA$(INT(1 + 3 * RND(1))) "…"; : W = W - 15 : GOSUB 3620
3050 IF SR <= 1 THEN 3080 ELSE IF SR <= 3 THEN 3070
3060 PRINT "Were you too excited? All your shots went wild." : RETURN
3070 PRINT "Not bad; you finally brought one down." : FA = 2 : GOTO 3090
3080 PRINT "With shooting that good, the Khan will want you in his army." : FA = 3
3090 PRINT "Your hunting yields" FA "sacks of food." : F = F + FA : RETURN
3100 '
3110 'Subroutine to check for zero quantities
3120 IF JL < 0 THEN JL = 0 : 'Can't have negative jewels
3130 IF F < 0 THEN F = 0 : 'or food
3140 IF L < 0 THEN L = 0 : 'or oil
3150 IF C < 0 THEN C = 0 : 'or clothing
3160 IF M < 0 THEN M = 0 : 'or medicine
3170 IF W < 0 THEN W = 0 : 'or arrows
3180 RETURN
3190 '
3200 'Subroutine to print inventory
3210 PRINT TAB(22) "Sacks of Skins of Robes and Balms and Crossbow"

3220 PRINT "Jewels Camels Food Oil Sandals";
3230 PRINT "Unguents Arrows" : GOSUB 3110
3240 PRINT USING "#####";JL; : X$ = "###########" : XAS = "#########.#"
3250 PRINT USING X$; B; : PRINT USING XA$; F; : PRINT USING XA$; L;
3260 PRINT USING X$; C; : PRINT USING X$; M; : PRINT USING X$; W : PRINT : RETURN
3270 '
3280 'End game - out of food
3290 PRINT "You keep going as long as you can, trying to find berries and"
3300 PRINT "edible plants. But this is barren country and you fall ill and,"
3310 PRINT "after weeks of suffering, you collapse into eternal sleep."
3320 PRINT : J = J + 1 : GOSUB 3510 : PRINT "You had the following left at the end :"
3330 GOSUB 3200 : PRINT "You traveled for" J * 2 "months!"
3340 PRINT : PRINT "Sorry, you didn't make it to Shang-tu." : GOTO 3490
3350 '
3360 'End of trip section
3370 GOSUB 3110 : 'Can't have negative jewels at end
3380 FOR I = 1 TO 3000 : NEXT I : CLS : FOR I = 1 TO 10
3390 BEEP : X$ = "CONGRATULATIONS !" : LOCATE 12, 1 : GOSUB 3760
3400 FOR K = 1 TO 100 : NEXT K : CLS : FOR K = 1 TO 50 : NEXT K : NEXT I
3410 CLS : PRINT "You have been traveling for" J * 2 "months !" : PRINT
3420 PRINT "You are ushered into the court of the Great Kublai Khan."
3430 PRINT "He surveys your meager remaining supplies :" : GOSUB 3200
3440 PRINT "… and marvels that you got here at all. He is disappointed"
3450 PRINT "that the Pope did not see fit to send the 100 men of learning"
3460 PRINT "that he requested and, as a result, keeps the three of you as"
3470 PRINT "his personal envoys for the next 21 years. Well done!" : PRINT
3480 '
3490 PRINT : INPUT "Would you like to try again"A$ : GOSUB 3840
3500 IF A$ = "Y" THEN RUN ELSE CLS : KEY ON : PRINT "Bye for now." : END
3505 '
3510 'Subroutine to print the date
3520 MO = J : WHILE MO > 6 : MO = MO - 6 : WEND
3530 YR = 1271 + INT(J / 6)
3540 PRINT : PRINT "Date :" MO$(MO) YR : RETURN
3550 '
3560 'Subroutine to read event probabilities
3570 FOR I = 1 TO 14 : READ A : EPT = EPT + A : EP(I) = EPT : NEXT I
3580 DATA 6, 4, 4, 6, 6, 6, 6, 4, 4, 1, 6, 8, 18, 10
3590 FOR I = 1 TO 6 : READ MO$(I) : NEXT I : RETURN
3600 DATA "March", "May", "July", "September", "November", "January"
3610 '
3620 'Subroutine to shoot crossbow
3630 RN = 1 + INT(4 * RND(1)) : 'Print random shooting word
3640 S1 = 60 * VAL(MID$(TIME$, 4, 2)) + VAL(RIGHT$(TIME$, 2)) : 'Start timer
3650 PRINT "Type :" S$(RN) " "; : INPUT X$ : IF X$ = S$(RN) THEN 3680

3660 FOR I = 1 TO LEN(X$) : 'Iterate through letters for possible lowercase
3670 IF MID$(S$(RN), I, 1)< >CHR$(ASC(MID$(X$, I, 1)) - 32) THEN 3700 ELSE NEXT I
3680 S2 = 60 * VAL(MID$(TIME$, 4, 2)) + VAL(RIGHT$(TIME$, 2)) : 'End timer
3690 SR = S2 - S1 - HX : RETURN : 'Shooting response
3700 PRINT "That's not it. Try again."; : GOTO 3650
3710 '
3720 'Subroutine to hit continue key
3730 X$ = "Press any key to continue." : GOSUB 3760
3740 WHILE LEN(INKEY$) = 0 : RN = RN + 1 : WEND : RETURN
3750 '
3760 'Subroutine to print a centered line
3770 PRINT TAB((70 - LEN(X$)) / 2) X$; : RETURN
3780 '
3790 'Subroutine to check if answer entered is in range
3800 IF A >= A1 AND A <= A2 THEN RETURN
3810 IF A < A1 THEN X$ = "few" ELSE X$ = "many"
3820 PRINT "That is too" X$; : INPUT ". Your answer please"; A : GOTO 3800
3830 '
3840 'Subroutine to process a yes/no answer
3850 GOSUB 3880 : IF A$ = "Y" OR A$ = "N" THEN RETURN
3860 INPUT "Don't understand answer. Enter 'Y' or 'N' please";A$ : GOTO 3850
3870 '
3880 'Subroutine to extract the first letter of an answer
3890 IF A$ = "" THEN A$ = "Y" : RETURN
3900 A$ = LEFT$(A$, 1) : IF A$ >= "A" AND A$ <= "Z" THEN RETURN
3910 A$ = CHR$(ASC(A$) - 32) : RETURN

Return to Table of Contents | Previous Section | Next Section