Safe Haskell | None |
---|
The type of game rule sets and assorted game data.
- data RuleKind = RuleKind {
- rsymbol :: !Char
- rname :: !Text
- rfreq :: !Freqs
- raccessible :: X -> Point -> TileKind -> Point -> TileKind -> Bool
- rtitle :: !Text
- rpathsDataFile :: FilePath -> IO FilePath
- rpathsVersion :: !Version
- ritemMelee :: ![Char]
- ritemRanged :: ![Char]
- ritemProject :: ![Char]
- rcfgRulesDefault :: !String
- rcfgUIDefault :: !String
- rmainMenuArt :: !Text
- ruvalidate :: [RuleKind] -> [RuleKind]
Documentation
The type of game rule sets and assorted game data.
For now the rules are immutable througout the game, so there is
no type Rule
to hold any changing parameters, just RuleKind
for the fixed set.
However, in the future, if the rules can get changed during gameplay
based on data mining of player behaviour, we may add such a type
and then RuleKind
will become just a starting template, analogously
as for the other content.
The raccessible
field holds a predicate that tells
whether one position is accessible from another.
Precondition: the two positions are next to each other.
RuleKind | |
|
ruvalidate :: [RuleKind] -> [RuleKind]Source
Validates the ASCII art format (TODO).