array(
"title" => "Waking up...",
"image" => "/images/pealsScaryZombieChick.gif",
"text" => "Your head really 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 --- meadow muffin ---...",
"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 "" . $room["title"] . "
\n";
print "
\n" . $room["text"] . "\n\n\n";
if (count($room["moves"]) == 0) {
print "
Start Again...
\n";
} else if (count($room["moves"]) > 1) {
print "Do you:";
}
while (list($dest, $blurb) = each($room["moves"])) {
print "
\n" . $blurb . "";
}
print "
\n\n";
?>
I wrote this, everyone else sucks. Have a nice day.