L-seed-0.1: Plant growing programming game




crossPoint :: Line -> Line -> Maybe PointSource

from http:www.pdas.com/lineint.htm

gardenToLines :: Garden a -> [(Line, a)]Source

Lines are annotated with its plant, identified by the extra data

lightenLines :: Double -> [(Line, a)] -> [(Line, a, Double)]Source

Add lightning from a given angle

allKindsOfStuffWithAngle :: forall a. Double -> [(Line, a)] -> ([(Line, a, Double)], [(Point, Point, Point, Point, Double)])Source

lightenGarden :: Angle -> Garden a -> Garden (a, Double)Source

Annotates each piece of the garden with the amount of line it attacts

mapLine :: (forall b. [(Line, b)] -> [(Line, b, c)]) -> c -> (c -> c -> c) -> Garden a -> Garden (a, c)Source

Helper to apply a function that works on lines to a garden