Fix(Colors): Use standard Racket color names and round coin dots
The (pp1 graphics) library resolves colors via Racket's color database, which doesn't support hex strings — they return #f causing a contract violation on set-brush. Replaced all hex colors with standard names: #2121DE -> "medium blue", #FFB851 -> "gold", #FFB8FF -> "hot pink", #FFFF00 -> "yellow", #FF0000 -> "red", #111111 -> "dark slate gray" Also switched coins from draw-rectangle! to draw-ellipse! for round dot rendering (arcade-accurate). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -154,13 +154,13 @@
|
||||
color-door))))))
|
||||
|
||||
;; draw-coins! :: maze -> /
|
||||
;; Redraws all coins as small centered dots.
|
||||
;; Redraws all coins as small round dots.
|
||||
(define (draw-coins! maze)
|
||||
((coins-tile 'clear!))
|
||||
((maze 'for-each-cell)
|
||||
(lambda (row col cell-type)
|
||||
(when (= cell-type cell-type-coin)
|
||||
((coins-tile 'draw-rectangle!)
|
||||
((coins-tile 'draw-ellipse!)
|
||||
(+ (grid->pixel-x col) coin-inset)
|
||||
(+ (grid->pixel-y row) coin-inset)
|
||||
coin-size
|
||||
|
||||
Reference in New Issue
Block a user