O'Reilly logo

AppleScript® Programming for the Absolute Beginner by Jerry Lee Ford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Back to the AppleScript Number Guessing Game

All right, it is time to turn your attention back to this chapter’s game project, the AppleScript Number Guessing game. This game challenges the player to guess a randomly generated number in the range of 1 to 100 in as few guesses as possible. To assist the player, the game provides her with a hint at the end of each turn, which lets her know if the answer is too high or too low.

Designing the Game

The AppleScript Number Guessing game will be created in 10 steps, as outlined here:

1.
Create a new AppleScript and save it with a name of Number Guess.
2.
Document the script and its purpose.
3.
Declare the game’s global variables.
4.
Generate the game’s first random number.
5.
Develop the game’s controlling ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required