18 lines
311 B
Fennel
18 lines
311 B
Fennel
;; main.fnl
|
|
(local player (require :player))
|
|
(var mode (require :mode.menu))
|
|
(var quit false)
|
|
|
|
(fn set-mode [m]
|
|
(set mode (require m))
|
|
)
|
|
|
|
(while (not quit)
|
|
(os.execute :clear)
|
|
(mode.display player)
|
|
(local cmd (io.read))
|
|
(if (= cmd "q") (set quit true))
|
|
(mode.key-pressed player cmd set-mode)
|
|
)
|
|
|