Go to a 12x12 maze to make it slightly easier to win
This commit is contained in:
parent
d045db0d8f
commit
f735e6a17e
|
@ -1,6 +1,20 @@
|
||||||
#lang scribble/doc
|
#lang scribble/doc
|
||||||
@(require "common.rkt" racket/class racket/draw (only-in slideshow/pict dc))
|
@(require "common.rkt" racket/class racket/draw (only-in slideshow/pict dc))
|
||||||
|
|
||||||
|
@(define (add-commas n)
|
||||||
|
(define s (number->string n))
|
||||||
|
(apply string-append
|
||||||
|
(reverse
|
||||||
|
(let loop ([digits (reverse (string->list s))])
|
||||||
|
(cond
|
||||||
|
[(null? digits) '()]
|
||||||
|
[(<= (length digits) 3) (list (apply string (reverse digits)))]
|
||||||
|
[else (list* (format ",~a~a~a"
|
||||||
|
(list-ref digits 2)
|
||||||
|
(list-ref digits 1)
|
||||||
|
(list-ref digits 0))
|
||||||
|
(loop (cdddr digits)))])))))
|
||||||
|
|
||||||
@gametitle["Tally Maze" "tally-maze" "Maze Enumeration Game"]
|
@gametitle["Tally Maze" "tally-maze" "Maze Enumeration Game"]
|
||||||
|
|
||||||
The object of @game{Tally Maze} is to help the blue ball
|
The object of @game{Tally Maze} is to help the blue ball
|
||||||
|
@ -18,7 +32,8 @@ in the maze to reach your blue ball and they take it.
|
||||||
|
|
||||||
The @litchar{n} key, however, adjusts the maze. More precisely,
|
The @litchar{n} key, however, adjusts the maze. More precisely,
|
||||||
it moves forward to the next maze in an enumeration of all
|
it moves forward to the next maze in an enumeration of all
|
||||||
40058175322602445443958933855600640 of the mazes that the game
|
@(add-commas 254377512893447941210664002794210519990861507330048)
|
||||||
|
of the mazes that the game
|
||||||
supports. Each maze is only a little bit different from
|
supports. Each maze is only a little bit different from
|
||||||
the one before, so you have to plan ahead in order to understand
|
the one before, so you have to plan ahead in order to understand
|
||||||
how the current maze differs from the next one. (Use the
|
how the current maze differs from the next one. (Use the
|
||||||
|
@ -28,7 +43,7 @@ Beware, however, that planning ahead one maze is not enough;
|
||||||
although one pumpkin just chases you in the current maze,
|
although one pumpkin just chases you in the current maze,
|
||||||
the other pumpkin tries to track where you might go if
|
the other pumpkin tries to track where you might go if
|
||||||
you advance to the next maze and to wait for you there.
|
you advance to the next maze and to wait for you there.
|
||||||
Not all games are winnable, although I believe most are.
|
Not all games are winnable (although I hope most are).
|
||||||
|
|
||||||
Thanks to Lazy Crazy (@url{http://lazycrazy.deviantart.com}) for
|
Thanks to Lazy Crazy (@url{http://lazycrazy.deviantart.com}) for
|
||||||
the blue ball icons and to YOOtheme (@url{http://www.yootheme.com/icons})
|
the blue ball icons and to YOOtheme (@url{http://www.yootheme.com/icons})
|
||||||
|
|
|
@ -42,8 +42,8 @@
|
||||||
(define game@
|
(define game@
|
||||||
(unit (import)
|
(unit (import)
|
||||||
(export)
|
(export)
|
||||||
(define maze-w 10)
|
(define maze-w 12)
|
||||||
(define maze-h 10)
|
(define maze-h 12)
|
||||||
|
|
||||||
(struct state
|
(struct state
|
||||||
(maze-index maze edges
|
(maze-index maze edges
|
||||||
|
@ -264,12 +264,12 @@
|
||||||
(and (= (car (state-player (current-state))) (- maze-w 1))
|
(and (= (car (state-player (current-state))) (- maze-w 1))
|
||||||
(= (cdr (state-player (current-state))) (- maze-h 1)))))
|
(= (cdr (state-player (current-state))) (- maze-h 1)))))
|
||||||
|
|
||||||
|
(define min-cell-size 55)
|
||||||
(define f (new frame% [label "Tally Maze"] [width 600] [height 600]))
|
(define f (new frame% [label "Tally Maze"] [width 600] [height 600]))
|
||||||
(define game-canvas (new game-canvas%
|
(define game-canvas (new game-canvas%
|
||||||
[parent f]
|
[parent f]
|
||||||
[min-width (* maze-w 60)]
|
[min-width (* maze-w min-cell-size)]
|
||||||
[min-height (* maze-h 60)]))
|
[min-height (* maze-h min-cell-size)]))
|
||||||
(define hp (new horizontal-panel% [parent f] [alignment '(right center)] [stretchable-height #f]))
|
(define hp (new horizontal-panel% [parent f] [alignment '(right center)] [stretchable-height #f]))
|
||||||
(define msg (new message% [parent hp] [label (format "Game #~a" initial-number)]))
|
(define msg (new message% [parent hp] [label (format "Game #~a" initial-number)]))
|
||||||
(void (new vertical-panel% [parent hp]))
|
(void (new vertical-panel% [parent hp]))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user