Data definitions for L-seed
- type UserTag = String
- type Angle = Double
- type Garden a = [Planted a]
- type GrowingGarden = Garden GrowthState
- type AnnotatedGarden = Garden StipeInfo
- data Planted a = Planted {
- plantPosition :: Double
- plantOwner :: Integer
- genome :: GrammarFile
- phenotype :: Plant a
- type GrowingPlanted = Planted GrowthState
- type AnnotatedPlanted = Planted StipeInfo
- data Plant a = Plant {}
- data StipeInfo = StipeInfo {
- siLength :: Double
- siSubLength :: Double
- siLight :: Double
- siSubLight :: Double
- siAngle :: Angle
- siDirection :: Angle
- siGrowth :: GrowthState
- siOffset :: Double
- siHeight :: Double
- data GrowthState
- type GrowingPlant = Plant GrowthState
- type AnnotatedPlant = Plant StipeInfo
- data ScreenContent = ScreenContent {}
- data Observer = Observer {
- obInit :: IO ()
- obState :: Integer -> GrowingGarden -> IO ()
- obGrowingState :: (ClockTime -> ScreenContent) -> IO ()
- obFinished :: GrowingGarden -> IO ()
- type GrammarFile = [GrammarRule]
- type Priority = Int
- type Weight = Int
- defaultPriority :: Priority
- defaultWeight :: Weight
- data GrammarRule = GrammarRule {}
- data Matchable
- data Cmp
- data Condition
- data GrammarAction
- data LengthDescr
Documentation
type Garden a = [Planted a]Source
A list of plants, together with their position in the garden, in the interval [0,1]
type GrowingGarden = Garden GrowthStateSource
Named variants of a garden, for more expressive type signatures
type AnnotatedGarden = Garden StipeInfoSource
A plant with metainformatoin
Planted | |
|
type GrowingPlanted = Planted GrowthStateSource
Named variants of a Planted, for more expressive type signatures
A plant, which is
Plant | a stipe with a length (factor of stipeLength), an angle relative to the parent stipe and a list of plants sprouting at the end |
A straight, untagged plant with length zero and no branches.
StipeInfo | |
|
data GrowthState Source
A GrowingPlant can be growing in one of these three ways:
NoGrowth | |
EnlargingTo Double | value indicates the growth target |
GrowingSeed Double | value indicates the current state [0..1] |
type GrowingPlant = Plant GrowthStateSource
Named variants of a Plant, for more expressive type signatures
type AnnotatedPlant = Plant StipeInfoSource
data ScreenContent Source
Representation of what is on screen
Main loop observers
Observer | |
|
type GrammarFile = [GrammarRule]Source
A complete grammar file
data GrammarRule Source
A single Rule. For now, only single branches can be matched, not whole subtree structures
GrammarRule | |
|