Code: Select all
array transit[5] = 0, 0, 0, 0, 0
routine GoTransit
{
local a, b, c
"Choose a destination (0 to remain where you are):"
for (a=0; a<20; a=a+1)
{
if (transit[a] = 1)
{
b = b + 1
print number b; ": ";
select a
case 0 { "Gothic St. (Your Apartment)" }
case 1 { "Far West Side (Mickey's House)" }
case 2 { "Adams Ave. (Kingston University)" }
case 3 { "Independence Blvd. (Downtown)" }
case 4 ( "Olympus St. (Greek Town)" }
}
}
input
if (word[1] = 0) { "You decide to stay here." }
else
{
for (a=0; a<20 ; a=1+1)
{
if (transit[a] = 1)
{
b = b + 1
if (b = word[1])
{
c = a
a = 20
select c
case 0 { "Gothic St." }
case 1 { "Far West Side" }
case 2 { "Adams Ave." }
case 3 { "Independence Blvd." }
case 4 { "Olympus St." }
}
}
}
}
}