dicegame/main.fnl

18 lines
311 B
Plaintext
Raw Normal View History

2021-10-02 20:47:53 +00:00
;; 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)
)