Use state more, start on menus

This commit is contained in:
Bill Niblock 2024-11-02 17:09:38 -04:00
parent e63a0039b6
commit fd96d53a34
7 changed files with 315 additions and 217 deletions

View file

@ -1,9 +1,11 @@
(local state (require :state))
; Cell Stuff
; The "cell-num" is the number of cells across; it is then squared to make the
; grid. Each cell has a "cell-size" of walls ("wall-width") and hallways
; ("hall-width").
(var cell-num 20)
(var (hall-width wall-width) (values 2 4))
(var map-meta (state.getMap))
(var cell-num (. map-meta :n))
(var (hall-width wall-width) (values (. map-meta :h) (. map-meta :w)))
(var cell-size (+ hall-width wall-width))
; (fn wall-seg [] (+ 10 (math.random 1 3)))
(fn wall-seg [] (math.random 11 13))