LambdaHack-0.2.0: A roguelike game engine in early and very active development

Safe HaskellNone

Game.LambdaHack.Binding

Description

Generic binding of keys to commands, procesing macros, printing command help. No operation in this module involves the State or Action type.

Synopsis

Documentation

data Binding a Source

Bindings and other information about player commands.

Constructors

Binding 

Fields

kcmd :: Map Key (String, a)

binding keys to commands

kmacro :: Map Key Key

macro map

kmajor :: [Key]

major, most often used, commands

ktimed :: [Key]

commands that take time, except movement

macroKey :: [(String, String)] -> Map Key KeySource

Produce the macro map from a macro association list taken from the config file. Macros cannot depend on each other. The map is fully evaluated to catch errors in macro definitions early.

keyHelp :: Binding a -> [String]Source

Produce a set of help screens from the key bindings.