Hangman


hangman.ss

The teachpack hangman.ss provides all the operations that draw.ss provides and the following two:

  • hangman : make-word reveal draw-next-part -> true
    that is, it consumes three auxiliary programs: make-word, reveal, and draw-next-part

  • hangman-list : reveal-for-list draw-next-part -> true
    that is, it consumes the programs reveal-for-list and draw-next-part.
  • The use of the operations is explained in more detail in the corresponding exercises.


    Sample session: Define the required programs. Execute and play:
    > (hangman make-word reveal draw-next-part)
    ... 
    
    > (hangman-list-repl (list 'a 'l 'e) (list '_ '_ '_) reveal draw-next-part)
    ...