From 093a897708c693f545c9adf45ce8569b6712064c Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 14 Feb 2009 20:59:45 +0000 Subject: [PATCH] svn: r13583 --- collects/games/chat-noir/chat-noir-literate.ss | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/collects/games/chat-noir/chat-noir-literate.ss b/collects/games/chat-noir/chat-noir-literate.ss index 430a3df3fe..bb249256eb 100755 --- a/collects/games/chat-noir/chat-noir-literate.ss +++ b/collects/games/chat-noir/chat-noir-literate.ss @@ -5,27 +5,37 @@ ] The first main data definition for Chat Noir is the state of the world. +It consists of a structure with six fields: a @scheme[board], a +@scheme[posn] for the cat, the state of the game (@scheme[state] below), +a @scheme[posn] for the location of the mouse (or @scheme[#f] if the +mouse is not in the window), and a boolean indicating if the @tt{h} +key has been pushed down. @chunk[ (define-struct world (board cat state size mouse-posn h-down?) #:transparent) ] -;; a world is: -;; (make-world board posn state number mouse posn-or-false boolean) - - +@verbatim[#<<--- ;; a state is either: ;; - 'playing ;; - 'cat-won ;; - 'cat-lost +--- +] +@verbatim[#<<--- ;; a board is ;; (listof cell) +--- +] +@verbatim[#<<--- ;; a cell is ;; (make-cell (make-posn int[0-board-size] ;; int[0-board-size]) ;; boolean) +--- +] @chunk[ (define-struct cell (p blocked?) #:transparent)]