Anillo III - Original — 186 of 199

Johan Paz

Release 3

Section 3 - Rescatar al jugador del pantano

[Describimos una subzona]

LaberintoCentral is a list of rooms that varies. LaberintoCentral is {Pantano1, Pantano2, Pantano3, Pantano4, Pantano5, Pantano6, Pantano7, Pantano8, Pantano9}.

Definition: a room is central if it is listed in LaberintoCentral.

[Contador de vueltas en el pantano central]

PasosEnCentral is a number that varies. PasosEnCentral is 0.

Before going from a room (called origen) to a central room:

if origen is not central:

now PasosEnCentral is 0;

[say "Poniendo el contador a cero.";]

otherwise:

increase PasosEnCentral by 1;

[say "Dando vueltas en el central por [PasosEnCentral] pasos.";]

if PasosEnCentral is greater than 9:

[say "Ya vale.";]

if there is a not central adjacent room (called salida):

[say "Encontrada salida: [salida].";]

let the way be the best route from the location to the salida;

try going the way instead.