From db824a3cbeb0cdfbb224813aada3183bf6986e0a Mon Sep 17 00:00:00 2001 From: Jay McCarthy Date: Fri, 21 Nov 2014 13:32:06 -0800 Subject: [PATCH] slimming godel deps --- pkgs/games/tally-maze/game.rkt | 13 ++++++------- pkgs/games/tally-maze/maze.rkt | 5 ++++- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/pkgs/games/tally-maze/game.rkt b/pkgs/games/tally-maze/game.rkt index 75a3de432f..37d8d79366 100644 --- a/pkgs/games/tally-maze/game.rkt +++ b/pkgs/games/tally-maze/game.rkt @@ -1,7 +1,5 @@ #lang racket/base - (require "maze.rkt" - (except-in "godel.rkt" unit/s) "../show-scribbling.rkt" racket/gui/base racket/class @@ -52,13 +50,14 @@ computer2 player-icon) #:transparent) -(define maze-count (spec-k (maze/s maze-w maze-h))) + +(define the-maze-count (maze-count maze-w maze-h)) (define (state-next-edges the-state) (build-walls - (decode (maze/s maze-w maze-h) - (modulo (+ (state-maze-index the-state) 1) - maze-count)) + (decode-maze maze-w maze-h + (modulo (+ (state-maze-index the-state) 1) + the-maze-count)) maze-w maze-h)) @@ -142,7 +141,7 @@ (define (next-maze) (define next-maze-state (fill-in-maze (current-state) - (modulo (+ (state-maze-index (current-state)) 1) maze-count))) + (modulo (+ (state-maze-index (current-state)) 1) the-maze-count))) (next-state! (if (game-over?) next-maze-state diff --git a/pkgs/games/tally-maze/maze.rkt b/pkgs/games/tally-maze/maze.rkt index 20d4067bea..caecb58c47 100644 --- a/pkgs/games/tally-maze/maze.rkt +++ b/pkgs/games/tally-maze/maze.rkt @@ -12,7 +12,10 @@ draw-maze build-walls decode-maze - maze/s) + maze-count) + +(define (maze-count w h) + (spec-k (maze/s w h))) (define (decode-maze maze-w maze-h n) (define mazes (maze/s maze-w maze-h))