diff --git a/teachpack/htdp/Docs/world.thtml b/teachpack/htdp/Docs/world.thtml index aec414a072..0478cb9f20 100644 --- a/teachpack/htdp/Docs/world.thtml +++ b/teachpack/htdp/Docs/world.thtml @@ -12,19 +12,35 @@ students to simulate a small world of animated drawings and games: and makes w the first world
on-tick-event : (World -> World) -> true
(on-tick-event tock)
- calls tock on the current world for every clock tick;
- the result is the next world
+ (on-tick-event tock)
means that DrScheme must call tock
+ on the current world every time the clock ticks; it uses the result as the next world
on-key-event : (KeyEvent World -> World) -> true
(on-key-event react)
- calls react on every keystroke event,
- with a char or a symbol representing the keystroke,
- and the current world; the result is the next world
+ (on-key-event change)
means that DrScheme must call
+ change
on the current world for every keystroke event; it uses
+ the result as the next world
-end-of-time : -> World
(end-of-time)
- stops the clock.
+++ ++ ;; A KeyEvent is one of: + ;; -- Char (char?) + ;; -- Symbol (symbol?) +
+ When the Keyevent is a char, the programmer (user of the computer) has hit an + alphanumeric key. Symbols such as'left
,'right
, +'up
,'down
,'release
denote arrow keys + or the events of releasing a key on the keypad. +
on-redraw : (World -> Image) -> true
(on-tick-event world->image)
means that DrScheme
+ calls world->image
whenever the canvas must be redrawn; the
+ result is displayed in the teachpack's canvas
+
+end-of-time : -> World
(end-of-time)
, it stops the clock; no
+ further tick events, key events, or redraw events take place until the world
+ is created again.
The rest are functions for creating scenes: @@ -47,17 +63,7 @@ students to simulate a small world of animated drawings and games: shows the list of images in loi, time-delayed
-Finally, the teachpack also adds some one new form of syntax to the -language: -
- Both update and produce are new keywords. - -The teachpack provides all the functions that image.ss provides.
+Finally, the teachpack provides all the functions that image.ss provides.
{(include "foot.tinc")}