{"size": 1349, "ext": "scrbl", "max_stars_repo_path": "htdp-doc/teachpack/htdp/scribblings/hangman.scrbl", "max_stars_repo_name": "bdeket/htdp", "max_stars_repo_stars_event_min_datetime": "2015-01-14T20:28:41.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-20T04:04:26.000Z", "max_issues_repo_path": "htdp-doc/teachpack/htdp/scribblings/hangman.scrbl", "max_issues_repo_name": "bdeket/htdp", "max_issues_repo_issues_event_min_datetime": "2015-01-14T19:50:21.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-19T21:38:00.000Z", "max_forks_repo_path": "htdp-doc/teachpack/htdp/scribblings/hangman.scrbl", "max_forks_repo_name": "bdeket/htdp", "max_forks_repo_forks_event_min_datetime": "2015-01-14T19:11:38.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-24T05:11:39.000Z"}
{"max_stars_count": 85, "max_issues_count": 132, "max_forks_count": 81, "avg_line_length": 40.8787878788, "max_line_length": 137, "alphanum_fraction": 0.733135656}
#lang scribble/doc

@(require scribble/manual "shared.rkt"
          (for-label racket teachpack/htdp/hangman))

@teachpack["hangman"]{Hangman}

@defmodule[#:require-form beginner-require htdp/hangman]

The teachpack implements the callback functions for playing a
@emph{Hangman} game, based on a function designed by a student. The player
guesses a letter and the program responds with an answer that indicates
how many times, if at all, the letter occurs in the secret word.

@defproc[(hangman [make-word (-> symbol? symbol? symbol? word?)][reveal (-> word? word? word?)][draw-next-part (-> symbol? true)]) true]{
Chooses a ``secret'' three-letter word and uses the given functions to
manage the @emph{Hangman} game.}

@defproc[(hangman-list
	   [reveal-for-list (-> symbol? (list-of symbol?) (list-of symbol?)
			        (list-of symbol?))]
	   [draw-next-part (-> symbol? true)]) true]{
Chooses a ``secret'' word---a list of symbolic letters---and uses the given
functions to manage the @emph{Hangman} game: 
@racket[reveal-for-list] determines how many times the chosen letter occurs
in the secret word; 
@racket[draw-next-part] is given the symbolic name of a body part and draws
it on a separately managed canvas.
}

In addition, the teachpack re-exports the entire functionality of the
drawing library; see @secref{draw} for documentation. 
