18 lines
311 B
Plaintext
18 lines
311 B
Plaintext
|
;; 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)
|
||
|
)
|
||
|
|