<HTML>
  <HEAD>
    <TITLE>The really quick monster zombie dead people example.</TITLE>
  </HEAD>
  <BODY>

    <?php
    /* The Database. */
    $roomDatabase = array(
        "WakingUp" => array(
            "title" => "Waking up...",
            "image" => "/images/pealsScaryZombieChick.gif",
            "text" => "Your head <B>really</B> hurts, blah blah...",
            "moves" => array(
                "Yelling" => "Yell for help",
                "WakeUpBro" => "Try to wake up your brother"
                )
             ),

        "WakeUpBro" => array(
            "title" => "You kick your brother in the balls",
            "image" => "/images/zombieGreenSchmokesPhoto.jpg",
            "text" => "Your bro always was a <I>--- meadow muffin ---</I>...",
            "moves" => array(
                "WakeUpBro2" => "Continue..."
                )
            )
        );


    /* The Engine Room. Beam me up Scotty. */
    $roomIndex = $HTTP_GET_VARS["room"];
    if (strlen($roomIndex) == 0) {
      $roomIndex = "WakingUp";
    }
    $room = $roomDatabase[$roomIndex];


    print "<P><H3><U>" . $room["title"] . "</U></H3></P>\n";
    print "<P><IMG SRC=" . $room["image"] . ">\n" . $room["text"] . "\n\n\n";

    if (count($room["moves"]) == 0) {
      print "<P><A HREF=?>Start Again...</A></P>\n";
    } else if (count($room["moves"]) > 1) {
      print "<P ALIGN=CENTER>Do you:";
    }
    while (list($dest, $blurb) = each($room["moves"])) {
      print "<BR>\n<A HREF=?room=" . $dest . ">" . $blurb . "</A>";
    }
    print "</P>\n\n";
    ?>

    <P ALIGN=CENTER><ADDRESS>I wrote this, everyone else sucks. Have a nice day.</ADDRESS></P>
  </BODY>
</HTML>

