You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
613 B
23 lines
613 B
{
|
|
:name "menu"
|
|
|
|
:display (fn [player]
|
|
(print "== Ceelo Game ==\n")
|
|
(print (string.format "You have $%d." player.cash))
|
|
(print (string.format "Your current bet is $%d.\n" player.bet))
|
|
(print "(b)et")
|
|
(print "(p)lay")
|
|
(print "(r)ules")
|
|
(print "(q)uit\n")
|
|
(io.write "> ")
|
|
)
|
|
|
|
:key-pressed (fn key-pressed [p k set-mode]
|
|
(match k
|
|
"p" (set-mode :mode.play)
|
|
"b" (set-mode :mode.bet)
|
|
"r" (set-mode :mode.rules)
|
|
)
|
|
)
|
|
}
|