/// m13 life model: the whole world is one value, like the snake and the match. module Snake.Life.Model open Snake.Model /// `Cells` is canonical: sorted row-major (by `Y`, then `X`), no duplicates, all on the board. type LifeState = { Cells: Point list Running: bool Seed: uint32 Generation: int } [] type LifeAction = | Frame | Toggle of Point | TogglePause | Step | Clear | Randomize // The board, in cells: LW columns, LH rows, LCELL pixels per cell. Below it the page shows a status strip. let LW = 40 let LH = 30 let LCELL = 16 let STRIP = 24 let initialLife (seed: uint32) : LifeState = { Cells = [] Running = false Seed = seed Generation = 0 }