1.18.10 Run, program, run
This section contains expressions that start the Chat Noir game going.
First, here is a function to compute the state of the world at the start of a game.
<initial-world> ::=
(define board-size 11) (define (make-initial-world) (define initial-board (add-n-random-blocked-cells 6 (empty-board board-size) board-size)) (make-world initial-board (make-posn (quotient board-size 2) (quotient board-size 2)) 'playing board-size #f #f))
Finally, we can define and provide a function to start the game by calling big-bang with the appropriate arguments.
<go> ::=