► |  | Teachpacks

1 | Ht DP Teachpacks
2 | Ht DC Teachpacks
3 | Ht DP/ 2e Teachpacks

▼ | 1 | Ht DP Teachpacks

1.1 | Manipulating Images: "image.ss"
1.2 | Simulations and Animations: "world.ss"
1.3 | Converting Temperatures: "convert.ss"
1.4 | Guessing Numbers: "guess.ss"
1.5 | Master Minding: "master.ss"
1.6 | Simple Drawing: "draw.ss"
1.7 | Hangman: "hangman.ss"
1.8 | Managing Control Arrows: "arrow.ss"
1.9 | Manipulating Simple HTML Documents: "docs.ss"
1.10 | Working with Files and Directories: "dir.ss"
1.11 | Graphing Functions: "graphing.ss"
1.12 | Simple Graphical User Interfaces: "gui.ss"
1.13 | An Arrow GUI: "arrow-gui.ss"
1.14 | Controlling an Elevator: "elevator.ss"
1.15 | Queens: "show-queen.ss"
1.16 | Matrix Operations: "matrix.ss"

On this page:

master

Version: 4.1.4
top← prev up next →

#### 1.5`` MasterMinding: "master.ss"

The teachpack implements GUI for playing a simple master mind-like game, based on a function designed by a student. The player clicks on two colors and the program responds with an answer that indicates how many colors and places were correct.

(master check-guess) → symbol?
check-guess : (-> symbol? symbol? symbol? symbol? boolean?)

Chooses two “secret” colors and then opens a graphical user interface for playing MasterMind. The player is prompted to choose two colors, via a choice tablet and mouse clicks. Once chosen, master uses check-guess to compare them.

If the two guesses completely match the two secret colors, check-guess must return 'PerfectGuess; otherwise it must return a different, informative symbol.

top← prev up next →