From 444413ad361ea7a33abce36cb9ccb6dedd3d9ddc Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Mon, 17 Jun 2013 09:44:51 -0400 Subject: [PATCH] typos in source documentation; thanks Laurent, OEV (cherry picked from commit 2de0c7270cd9d34972673e62d7c1bff2eb91f5da) --- collects/realm/chapter13/run.rkt | 2 +- collects/realm/chapter2/source.rkt | 2 +- collects/realm/chapter5/source.rkt | 2 +- collects/realm/chapter5/ufo-source.rkt | 224 +++++++++++++------------ collects/realm/chapter8/source.rkt | 5 +- 5 files changed, 123 insertions(+), 112 deletions(-) diff --git a/collects/realm/chapter13/run.rkt b/collects/realm/chapter13/run.rkt index 578eb39117..2afbe6bcb0 100644 --- a/collects/realm/chapter13/run.rkt +++ b/collects/realm/chapter13/run.rkt @@ -6,7 +6,7 @@ You pick a number. The program guesses the nunber, by asking you questions. Your responses are "too - small" "too large" or "you uessed it". + small" "too large" or "you guessed it". In the Distributed Guess My Number game a player uses a client to connect to the server. The Server attempts to guess what number the client is thinking diff --git a/collects/realm/chapter2/source.rkt b/collects/realm/chapter2/source.rkt index 64d51841f8..6dc5e8dd5e 100644 --- a/collects/realm/chapter2/source.rkt +++ b/collects/realm/chapter2/source.rkt @@ -6,7 +6,7 @@ You pick a number. The program guesses the nunber, by asking you questions. Your responses are "too - small" "too large" or "you uessed it". + small" "too large" or "you guessed it". Play ---- diff --git a/collects/realm/chapter5/source.rkt b/collects/realm/chapter5/source.rkt index c880749e2a..5217dfee1f 100644 --- a/collects/realm/chapter5/source.rkt +++ b/collects/realm/chapter5/source.rkt @@ -6,7 +6,7 @@ You pick a number. The program guesses the nunber, by asking you questions. Your responses are "too - small" "too large" or "you uessed it". + small" "too large" or "you guessed it". Play ---- diff --git a/collects/realm/chapter5/ufo-source.rkt b/collects/realm/chapter5/ufo-source.rkt index 7bda289e18..fdc8333583 100644 --- a/collects/realm/chapter5/ufo-source.rkt +++ b/collects/realm/chapter5/ufo-source.rkt @@ -1,7 +1,7 @@ #reader(lib"read.ss""wxme")WXME0108 ## #| This file uses the GRacket editor format. - Open this file in DrRacket version 5.3.1.9 or later to read it. + Open this file in DrRacket version 5.3.4.12 or later to read it. Most likely, it was created by saving a program in DrRacket, and it probably contains a program with non-text elements @@ -50,7 +50,7 @@ 1 0 10 #"text-box%\0" 1 0 32 #"(lib \"text-snipclass.ss\" \"xml\")\0" 1 0 1 6 #"wxloc\0" - 0 0 65 0 1 #"\0" + 0 0 67 0 1 #"\0" 0 75 1 #"\0" 0 12 90 -1 90 -1 3 -1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 255 255 255 1 -1 0 9 #"Standard\0" @@ -112,6 +112,9 @@ 1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 41 128 38 0 0 0 -1 -1 2 1 #"\0" 0 -1 1 #"\0" +1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 49 +#"framework:syntax-color:scheme:hash-colon-keyword\0" +0 -1 1 #"\0" 1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 1 1 1 132 60 36 0 0 0 -1 -1 2 42 #"framework:syntax-color:scheme:parenthesis\0" 0 -1 1 #"\0" @@ -181,7 +184,7 @@ 1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 255 56 81 0 0 0 -1 -1 2 27 #"plt:htdp:test-coverage-off\0" 0 -1 1 #"\0" -1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 1 0 0 0 0 0 0 255 165 0 0 0 0 -1 -1 4 1 +1 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 0 0 0 0 0 0 255 56 81 0 0 0 -1 -1 4 1 #"\0" 0 70 1 #"\0" 1.0 0 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0 @@ -199,35 +202,38 @@ 1 0 -1 -1 -1 -1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 147 0 27 3 12 #"#lang racket" +0 0 23 29 1 #"\n" +0 0 23 29 1 #"\n" +0 0 23 3 1 #"(" 0 0 14 3 7 #"require" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 14 #"2htdp/universe" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 11 #"2htdp/image" -0 0 22 3 1 #")" -0 0 22 29 1 #"\n" -0 0 22 29 1 #"\n" -0 0 22 3 1 #"(" +0 0 23 3 1 #")" +0 0 23 29 1 #"\n" +0 0 23 29 1 #"\n" +0 0 23 3 1 #"(" 0 0 15 3 6 #"define" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 5 #"WIDTH" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 20 3 3 #"200" -0 0 22 3 1 #")" -0 0 22 29 1 #"\n" -0 0 22 3 1 #"(" +0 0 23 3 1 #")" +0 0 23 29 1 #"\n" +0 0 23 3 1 #"(" 0 0 15 3 6 #"define" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 6 #"HEIGHT" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 20 3 3 #"300" -0 0 22 3 1 #")" -0 0 22 29 1 #"\n" -0 0 22 3 1 #"(" +0 0 23 3 1 #")" +0 0 23 29 1 #"\n" +0 0 23 29 1 #"\n" +0 0 17 3 86 +( + #";; depending on your settings, drracket may claim that the image cau" + #"ses a syntax error" +) 0 0 23 29 1 #"\n" +0 0 17 3 50 #";; please ignore this warning and click RUN anyway" +0 0 23 29 1 #"\n" +0 0 23 3 1 #"(" 0 0 15 3 6 #"define" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 12 #"IMAGE-of-UFO" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 2 23 4 1 #"\0" 2 -1.0 -1.0 0.0 0.0 0 6 500 ( @@ -440,112 +454,112 @@ #"8\307\30\377]\23\e\300\253\376\364\337" #"\277\202w\22\e\300;\211\r\340\235\304\6\360Nb\3\370?" #"R\3460\324\254\223\240\300\0\0\0\0IEND\256B`\202" -) 0 0 22 3 1 #")" -0 0 22 29 1 #"\n" -0 0 22 29 1 #"\n" -0 0 22 3 1 #"(" +) 0 0 23 3 1 #")" +0 0 23 29 1 #"\n" +0 0 23 29 1 #"\n" +0 0 23 3 1 #"(" 0 0 15 3 6 #"define" -0 0 22 3 2 #" (" +0 0 23 3 2 #" (" 0 0 14 3 14 #"add-3-to-state" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 13 #"current-state" -0 0 22 3 1 #")" -0 0 22 29 1 #"\n" -0 0 22 3 3 #" (" +0 0 23 3 1 #")" +0 0 23 29 1 #"\n" +0 0 23 3 3 #" (" 0 0 14 3 1 #"+" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 13 #"current-state" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 20 3 1 #"3" -0 0 22 3 2 #"))" -0 0 22 29 1 #"\n" -0 0 22 29 1 #"\n" -0 0 22 29 1 #"\n" -0 0 22 3 1 #"(" +0 0 23 3 2 #"))" +0 0 23 29 1 #"\n" +0 0 23 29 1 #"\n" +0 0 23 29 1 #"\n" +0 0 23 3 1 #"(" 0 0 15 3 6 #"define" -0 0 22 3 2 #" (" +0 0 23 3 2 #" (" 0 0 14 3 30 #"draw-a-ufo-onto-an-empty-scene" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 13 #"current-state" -0 0 22 3 1 #")" -0 0 22 29 1 #"\n" -0 0 22 3 3 #" (" +0 0 23 3 1 #")" +0 0 23 29 1 #"\n" +0 0 23 3 3 #" (" 0 0 14 3 11 #"place-image" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 12 #"IMAGE-of-UFO" -0 0 22 3 2 #" (" +0 0 23 3 2 #" (" 0 0 14 3 1 #"/" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 5 #"WIDTH" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 20 3 1 #"2" -0 0 22 3 2 #") " +0 0 23 3 2 #") " 0 0 14 3 13 #"current-state" -0 0 22 29 1 #"\n" -0 0 22 3 16 #" (" +0 0 23 29 1 #"\n" +0 0 23 3 16 #" (" 0 0 14 3 11 #"empty-scene" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 5 #"WIDTH" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 6 #"HEIGHT" -0 0 22 3 3 #")))" -0 0 22 29 1 #"\n" -0 0 22 29 1 #"\n" -0 0 22 3 1 #"(" +0 0 23 3 3 #")))" +0 0 23 29 1 #"\n" +0 0 23 29 1 #"\n" +0 0 23 3 1 #"(" 0 0 15 3 6 #"define" -0 0 22 3 2 #" (" +0 0 23 3 2 #" (" 0 0 14 3 12 #"state-is-300" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 13 #"current-state" -0 0 22 3 1 #")" -0 0 22 29 1 #"\n" -0 0 22 3 3 #" (" +0 0 23 3 1 #")" +0 0 23 29 1 #"\n" +0 0 23 3 3 #" (" 0 0 14 3 2 #">=" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 13 #"current-state" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 20 3 3 #"300" -0 0 22 3 2 #"))" -0 0 22 29 1 #"\n" -0 0 22 29 1 #"\n" -0 0 22 3 1 #"(" +0 0 23 3 2 #"))" +0 0 23 29 1 #"\n" +0 0 23 29 1 #"\n" +0 0 23 3 1 #"(" 0 0 15 3 6 #"define" -0 0 22 3 2 #" (" +0 0 23 3 2 #" (" 0 0 14 3 4 #"main" -0 0 22 3 1 #")" -0 0 22 29 1 #"\n" -0 0 22 3 3 #" (" +0 0 23 3 1 #")" +0 0 23 29 1 #"\n" +0 0 23 3 3 #" (" 0 0 14 3 8 #"big-bang" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 20 3 1 #"0" -0 0 22 3 40 #" " +0 0 23 3 40 #" " 0 0 17 3 17 #";; initial state " -0 0 22 29 1 #"\n" -0 0 22 3 13 #" (" +0 0 23 29 1 #"\n" +0 0 23 3 13 #" (" 0 0 14 3 7 #"on-tick" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 14 #"add-3-to-state" -0 0 22 3 18 #") " +0 0 23 3 18 #") " 0 0 17 3 32 #";; when the clock ticks, add ..." -0 0 22 29 1 #"\n" -0 0 22 3 13 #" (" +0 0 23 29 1 #"\n" +0 0 23 3 13 #" (" 0 0 14 3 7 #"to-draw" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 30 #"draw-a-ufo-onto-an-empty-scene" -0 0 22 3 2 #") " +0 0 23 3 2 #") " 0 0 17 3 36 #";; when the state changes, draw ... " -0 0 22 29 1 #"\n" -0 0 22 3 13 #" (" +0 0 23 29 1 #"\n" +0 0 23 3 13 #" (" 0 0 14 3 9 #"stop-when" -0 0 22 3 1 #" " +0 0 23 3 1 #" " 0 0 14 3 12 #"state-is-300" -0 0 22 3 18 #"))) " +0 0 23 3 18 #"))) " 0 0 17 3 45 #";; when the UFO's y coordinate is 300, stop. " -0 0 22 29 1 #"\n" -0 0 22 29 1 #"\n" +0 0 23 29 1 #"\n" +0 0 23 29 1 #"\n" 0 0 17 3 43 #";; to run the program, click run and enter " -0 0 22 29 1 #"\n" +0 0 23 29 1 #"\n" 0 0 17 3 14 #";; > (main) " -0 0 22 29 1 #"\n" +0 0 23 29 1 #"\n" 0 0 17 3 18 #";; at the prompt. " 0 0 diff --git a/collects/realm/chapter8/source.rkt b/collects/realm/chapter8/source.rkt index 9f47e7cb32..9f47c5291c 100644 --- a/collects/realm/chapter8/source.rkt +++ b/collects/realm/chapter8/source.rkt @@ -22,9 +22,6 @@ After that, it is the player's turn again. Just in case, the player can end a turn prematurely with "e". - - Finally, "n" starts a new game. - Play ---- @@ -219,7 +216,7 @@ [(key=? "up" k) (move-target w (- PER-ROW))] [(key=? "e" k) (end-turn w)] - [(key=? "n" k) (initialize-orc-world)] +;; [(key=? "n" k) (initialize-orc-world)] [else w]) (give-monster-turn-if-attack#=0 w)