justgook/elm-game-logic/1.0.0

NOTE: the latest version is 3.0.0

Logic.Component

type alias Set comp =
Array (Maybe comp)

Component storage, main building block of world

type alias Spec comp world =
{ get : world -> Set comp
, set : Set comp -> world -> world
}

Component specification, how to get Component.Set from and world, and set back into world (used by Systems)

empty : Set comp

Initial value of any empty Component.Set - mostly used to init component sets in world