purpose statements
This commit is contained in:
parent
49a62fd285
commit
a354195ae4
|
@ -1,19 +1,26 @@
|
|||
#lang racket
|
||||
|
||||
(require rackunit rackunit/text-ui)
|
||||
#|
|
||||
The Guess My Number game, played at DrRacket's REPL
|
||||
---------------------------------------------------
|
||||
|
||||
You pick a number. The program guesses the nunber,
|
||||
by asking you questions. Your responses are "too
|
||||
small" "too large" or "you uessed it".
|
||||
|
||||
;; Play a Guess my Number game at the REPL.
|
||||
;; Run program.
|
||||
;; Pick a number X between <n> and <m>.
|
||||
;; Evaluate
|
||||
;; (start <n> <m>)
|
||||
;; The program will respond with a number.
|
||||
;; Use
|
||||
;; (bigger)
|
||||
;; and
|
||||
;; (smaller)
|
||||
;; to let it know what you think of the guess.
|
||||
;; Watch how qiuckly the program guesses X.
|
||||
Play
|
||||
----
|
||||
|
||||
Click Run. Pick a number X between <n> and <m>.
|
||||
Evaluate
|
||||
(start <n> <m>)
|
||||
The program will respond with a number.
|
||||
Use
|
||||
(bigger)
|
||||
and
|
||||
(smaller)
|
||||
to let it know what you think of its guess.
|
||||
|#
|
||||
|
||||
;
|
||||
;
|
||||
|
@ -102,6 +109,8 @@
|
|||
|
||||
(module+ test
|
||||
|
||||
(require rackunit rackunit/text-ui)
|
||||
|
||||
;; basic guesses
|
||||
|
||||
(check-equal? (guess) 50)
|
||||
|
|
|
@ -1,17 +1,23 @@
|
|||
#lang racket
|
||||
|
||||
;; -----------------------------------------------------------------------------
|
||||
;; Play a "Guess my Number" game with a GUI.
|
||||
#|
|
||||
The Guess My Number game, with a simple graphical user interface (GUI)
|
||||
----------------------------------------------------------------------
|
||||
|
||||
You pick a number. The program guesses the nunber,
|
||||
by asking you questions. Your responses are "too
|
||||
small" "too large" or "you uessed it".
|
||||
|
||||
(require rackunit rackunit/text-ui 2htdp/image 2htdp/universe)
|
||||
Play
|
||||
----
|
||||
|
||||
;; Play a Guess my Number game at the REPL.
|
||||
;; Run program.
|
||||
;; Pick a number X between <n> and <m>.
|
||||
;; Evaluate
|
||||
;; (start <n> <m>)
|
||||
;; This will pop up a window with instructions for interacting with the program.
|
||||
;; Watch how qiuckly the program guesses X.
|
||||
Click Run. Pick a number X between <n> and <m>.
|
||||
Evaluate
|
||||
(start <n> <m>)
|
||||
This will pop up a window with instructions for interacting with the program.
|
||||
|#
|
||||
|
||||
(require 2htdp/image 2htdp/universe)
|
||||
|
||||
;
|
||||
;
|
||||
|
@ -190,6 +196,8 @@
|
|||
|
||||
(module+ test
|
||||
|
||||
(require rackunit rackunit/text-ui)
|
||||
|
||||
;; testing the 'model' functions for basic guesses
|
||||
|
||||
(check-true (single? (interval 50 50)))
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
#lang racket
|
||||
|
||||
#|
|
||||
The Snake game
|
||||
--------------
|
||||
|
||||
The Snake game revolves around a room filled with pieces of radioactive goo
|
||||
and a snake that can remove this goo.
|
||||
|
||||
|
@ -13,13 +16,15 @@
|
|||
the four arrow keys. When the snake gets close to a piece of goo, it eats the
|
||||
goo and grows a new segment. If the snake runs into itself or one of the four
|
||||
walls, the game is over. The length of the snake is the player's score.
|
||||
|#
|
||||
|
||||
;; Play a Snake game.
|
||||
;; Run program and evaluate
|
||||
;; (start-snake)
|
||||
;; This will pop up a window with instructions for interacting with the program.
|
||||
;; Watch how qiuckly the program guesses X.
|
||||
Play
|
||||
----
|
||||
|
||||
Run and evaluate
|
||||
(start-snake)
|
||||
This will pop up a window with instructions for interacting with the program.
|
||||
Watch how qiuckly the program guesses X.
|
||||
|#
|
||||
|
||||
;
|
||||
;
|
||||
|
|
|
@ -26,10 +26,10 @@
|
|||
Finally, "n" starts a new game.
|
||||
|
||||
|
||||
Play a Orc game
|
||||
-----------------
|
||||
Play
|
||||
----
|
||||
|
||||
Run program and evaluate
|
||||
Run and evaluate
|
||||
(start-game)
|
||||
This will pop up a window that displays the player's vitals, the orcs and
|
||||
their basic state, and the game instructions.
|
||||
|
|
Loading…
Reference in New Issue
Block a user