[ prog / sol / mona ]

prog


Roguelike dungeon generator

7 2024-03-16 08:09

It always help me to visualize things early in the development process. Let's see what we have so far:

(require srfi/43)
(define terrain-width 12)
(define terrain-height 12)
(define (print-terrain)
  (vector-for-each (lambda (i n)
                     (cond ((zero? (remainder (+ i 1) terrain-width)) (newline))
                            ((eq? n 'floor) (display ".")))) terrain))

(print-terrain)

...........
...........
...........
...........
...........
...........
...........
...........
...........
...........
...........
...........

Nice.

8


VIP:

do not edit these