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 Rock, Paper, Scissors Game

Now it is time to turn your attention back to the development of the Rock, Paper, Scissors game. This version of the game pits the player against the computer, whose moves are generated randomly.

Designing the Game

The development of the Rock, Paper, Scissors game will be accomplished in 12 steps, as outlined here:

1.
Create a new AppleScript and save it with a name of RockPaperScissors.
2.
Document the script and its purpose.
3.
Declare the game’s global variables.
4.
Develop the overall controlling programming logic for the game.
5.
Display the game’s closing window.
6.
Visually separate control logic from the script’s handlers.
7.
Create the GetComputerMove() handler.
8.
Create the GetPlayerMove()

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