877Chapter 46A Trivia Game$game_display->updateWithAnswer($lower, $upper); } // CASE (Unable to start debugging on the web server)
877Chapter 46A Trivia Game$game_display->updateWithAnswer($lower, $upper); } // CASE 3: Player has either just arrived or has // finished a game and asked for a new one. elseif (!get_post_value( POSTCHECK ) || get_post_value( NEW )) { $game_display = new GameDisplay(new Game()); } // CASE 4: Something is wrong. // The page is the result of a POST operation, // yet we don t seem to have a live session, so// we are not successfully tracking a game. // The only thing to do is complain, and ask about // cookies. else { $game_display = new GameDisplay(new Game()); throw (new Exception( We couldn t track your game. . You may have to enable cookies to play )); } // Construct string that will be displayed as page$page_string = $game_display->display(); // Store game state in session so that next// page can pick it upset_session_value( game , $game_display->_game); } // end of try blockcatch (Exception $exception) { // There is a problem somewhere. Create// an error page. $exception_msg = $exception->getMessage(); $display = new GameDisplay(null); $page_string = $display->makeErrorPage($exception_msg); // hope to start fresh next timeunset_session_value( game ); } // Actually echo page to browserecho($page_string); ?>
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.