moved the literate version of chat noir over so it is used by plt-games now
svn: r13776
This commit is contained in:
parent
121764e7b5
commit
a66ed082fb
|
@ -2183,8 +2183,8 @@ for the other functions in this document
|
||||||
@section{Run, program, run}
|
@section{Run, program, run}
|
||||||
|
|
||||||
@chunk[<go>
|
@chunk[<go>
|
||||||
(printf "passed ~s tests\n" test-count)
|
;(printf "passed ~s tests\n" test-count)
|
||||||
(flush-output)
|
;(flush-output)
|
||||||
|
|
||||||
(let* ([board-size 11]
|
(let* ([board-size 11]
|
||||||
[initial-board
|
[initial-board
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
(module chat-noir-module lang/htdp-intermediate-lambda
|
|
||||||
(require (lib "world.ss" "htdp"))
|
|
||||||
; (require "hash.ss")
|
|
||||||
(require (lib "include.ss" "scheme"))
|
|
||||||
(include "chat-noir.ss"))
|
|
|
@ -10,27 +10,36 @@
|
||||||
|
|
||||||
(provide game@)
|
(provide game@)
|
||||||
(define orig-namespace (current-namespace))
|
(define orig-namespace (current-namespace))
|
||||||
(define-runtime-path chat-noir "chat-noir-module.ss")
|
(define-runtime-path chat-noir "chat-noir-literate.ss")
|
||||||
|
|
||||||
(define-unit game@
|
(define-unit game@
|
||||||
(import)
|
(import)
|
||||||
(export)
|
(export)
|
||||||
(define ns (make-base-namespace))
|
(define ns (make-base-namespace))
|
||||||
(parameterize ([current-namespace ns])
|
|
||||||
(namespace-attach-module orig-namespace '(lib "mred.ss" "mred"))
|
|
||||||
(namespace-attach-module orig-namespace '(lib "class.ss" "scheme"))
|
|
||||||
(dynamic-require chat-noir #f))
|
|
||||||
|
|
||||||
;; a hack.
|
;; a hack.
|
||||||
;; this adds a help button to the world.ss window
|
;; this adds a help button to the world.ss window
|
||||||
(let ([fs (get-top-level-windows)])
|
(thread
|
||||||
(unless (null? fs)
|
(λ ()
|
||||||
(let ([f (car fs)]
|
(let loop ([n 0])
|
||||||
[show-help
|
(when (n . < . 100)
|
||||||
(show-scribbling
|
(sleep 1/10)
|
||||||
'(lib "games/scribblings/games.scrbl")
|
(let ([fs (get-top-level-windows)])
|
||||||
"chat-noir")])
|
(cond
|
||||||
(new button%
|
[(null? fs)
|
||||||
[parent f]
|
(loop (+ n 1))]
|
||||||
[callback (λ (x y) (show-help))]
|
[else
|
||||||
[label (string-constant help)])))))
|
(let ([f (car fs)]
|
||||||
|
[show-help
|
||||||
|
(show-scribbling
|
||||||
|
'(lib "games/scribblings/games.scrbl")
|
||||||
|
"chat-noir")])
|
||||||
|
(new button%
|
||||||
|
[parent f]
|
||||||
|
[callback (λ (x y) (show-help))]
|
||||||
|
[label (string-constant help)]))]))))))
|
||||||
|
|
||||||
|
(parameterize ([current-namespace ns])
|
||||||
|
(namespace-attach-module orig-namespace '(lib "mred.ss" "mred"))
|
||||||
|
(namespace-attach-module orig-namespace '(lib "class.ss" "scheme"))
|
||||||
|
(dynamic-require chat-noir #f)))
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user