278. koan village 2: the tyger’s hunt

[php]
$ending = 0;
$interrupt = “”;
if (!isset($_REQUEST[‘tyg’])) { // if nothing is set
$_SESSION[‘pouncecount’] = 0;
$_SESSION[‘prowlcount’] = 0;
$_SESSION[‘watchcount’] = 0;[/php]
the tyger was observing the dark dark woods when he smelled the tortoise.

a few steps of careful prowling and he could see the tortoise, as well. he was coming toward the tyger, but he couldn’t see him yet. probably on account of tortoise’s notoriously bad vision or the fact that the tortoise was looking at the ground.
[php]} elseif ($_REQUEST[‘tyg’] == ‘pou’) { // if it’s ‘pou’
$_SESSION[‘pouncecount’]++;
if ($_SESSION[‘prowlcount’] == 0) {
$ending = 1; [/php]
the tyger pounced on the tortoise. unfortunately for the tyger, mid-pounce the tortoise looked up and saw him and retracted into his shell.

no matter how hard the tyger tried, he could not get into that shell.

[php]$_SESSION[‘newitem’] = “failure”;
$_SESSION[‘zencolor’] = “red”;
[/php]

[php function=13]

[php]} elseif ($_SESSION[‘prowlcount’] == 1) {[/php]
the tyger pounced on the tortoise.

he was about a good distance behind the tortoise, and he leapt exactly where the tortoise was. unfortunately, while he was in the air, the tortoise crawled a small fraction of that distance. small, but enough to avoid the pounce and then crawl inside his shell.
[php]$_SESSION[‘newitem’] = “a classic xeno situation”;
$_SESSION[‘zencolor’] = “red”;
$ending = 1;
[/php]

[php function=13]

[php]} elseif (($_SESSION[‘prowlcount’] > 1) and ($_SESSION[‘watchcount’] > 0)) {[/php]
the tyger pounced on the tortoise and grabbed him before he could hide in his shell. the tortoise looked up at him and said, “tyger, if you don’t eat me, i will tell you how you may kill the Goddess.”

the tyger stared into the tortoise’s eyes and nodded.

the tortoise said, “you need a lock of her hair.”

the tyger let the tortoise go.
[php]$_SESSION[‘newitem’] = “a compromise”;
$ending = 1;
$_SESSION[‘zencolor’] = “blue”;
[/php]

[php function=13]

[php]} elseif ($_SESSION[‘prowlcount’] > 1) { [/php]
the tyger leapt toward the tortoise. unfortunately, he was so close that he soared over the little guy and landed in front of him.

the tortoise immediately ducked inside his shell.

[php]$_SESSION[‘newitem’] = “that you can be too close to prey”;
$ending = 1;
$_SESSION[‘zencolor’] = “orange”;
[/php]

[php function=13]

[php]} // close the pouncecount check
} elseif ($_REQUEST[‘tyg’] == ‘pro’) { // if it’s ”
$_SESSION[‘prowlcount’]++;
if ($_SESSION[‘prowlcount’] == 1) {[/php]
the tyger prowled around the tortoise, until he was behind the guy.
[php]} elseif ($_SESSION[‘prowlcount’] == 2) {[/php]
the tyger slowly prowled up behind the tortoise.
[php]} elseif ($_SESSION[‘prowlcount’] > 2) {
$ending = 1;[/php]
the tyger prowled over the tortoise. the tortoise saw him. the jig was up.
[php]}[/php]
[php]} elseif ($_REQUEST[‘tyg’] == ‘wat’) { // if it’s ”
$_SESSION[‘watchcount’]++;
if ($_SESSION[‘watchcount’] == 1) {[/php]
the tyger watched the tortoise go. he continued to crawl into the darkness.

“where is he going?” the tyger wondered.
[php]} elseif ($_SESSION[‘watchcount’] > 1) {[/php]
the tyger watched as the tortoise crawled deep into the dark dark woods. he followed him from the shadows until the tortoise reached a mysterious cabin, which he crawled inside.

the door closed behind him.

[php]$_SESSION[‘newitem’] = “a mysterious cabin”;
$_SESSION[‘zencolor’] = “brown”;
$ending = 1;
[/php]

[php function=13]

[php]} // end of watch-count[/php]
[php]} // end of the whole shebang [/php]
[php]if ($ending == 0) { [/php]

he considered pouncing[php]if ($_REQUEST[‘tyg’] == ‘pou’) echo ” again”;[/php], prowling[php]if ($_REQUEST[‘tyg’] == ‘pro’) echo ” some more”;[/php], or watching[php]if ($_REQUEST[‘tyg’] == ‘pou’) echo ” some more”;[/php].

[php]} else { [/php]

try again?

[php]} // end the redo message