889Chapter 46A Trivia Game
Credit is capped at 15. Whenever your credit falls below zero, the game is over. EOT; return($rules); } function gameLostText () { global $PHP_SELF; $game_over = <<Thanks for playing! Thanks for taking the certainty quiz, and for beingsuch a good LOSER!
EOT; return($game_over); } function gameWonText () { global $PHP_SELF; $game_over = <<You won! Thanks for taking the certainty quiz, and for beating it. We bow to your superior knowledgeof what you know, and what you don t know. EOT; return($game_over); } } ?> game_class.phpIn this section, we get to the basic logic of the game. The Gameobject contains everythingworth remembering about the current state of the game, as well as methods for updating it. Data membersIt s worth listing the important pieces of data that the Gameobject tracks: .The current question (an instance of class Question). .The previous question, if any (an instance of class Question). .The questions that have been asked at this level (an array of database IDs). .The questions that could still be asked at this level (an array of database IDs).
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.
This entry was posted
on Saturday, March 22nd, 2008 at 7:16 pm and is filed under Domain.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.