CHAPTER 6 MAKING DECISIONS (Web server on xp) WITH CONDITIONAL LOGIC
CHAPTER 6 MAKING DECISIONS WITH CONDITIONAL LOGIC 185 The first two code statements instantiate a Random object and assign a randomly generated number (with a value between 1 and 100) to the intSecretNumber property. The next two statements enable the Slider control and set its initial value to zero. The property representing the number of guesses made is reset to zero, the rest of the EditField controls are updated and the PushButton control labeled Play is disabled, thus preventing the player from starting a new game until the current game ends. Next, add the following code statement to the Action event belonging to the PushButton control labeled Exit. Quit ‘Terminate the application’s execution The last of the code to be added to this application supports the display of About information, which the player can access by clicking Help . About. To add these statements, you must first add a menu handler to your application by clicking the Add Menu Handler button on the Code Editor. Once this is done, you can enter the two code statements shown in the following. ‘Display About Message MsgBox(”RB Number Guess - By Jerry Ford - Copyright 2006″) Testing RB Number Guess If you have not done so already, go ahead and save your application. Name it RB Number Guess or any other name you prefer. Now, take a little time to test the execution of the game to make sure it works as expected. Figure 6-6 demonstrates how the game looks when it s being played. Figure 6-6. Game stats are updated dynamically at the end of each move. Figure 6-7 shows the pop-up dialog window that appears if you click Help . About.
You want to have a cheap webhost for your apache application, then check apache web hosting services.