Unit ULife

*****************************************************************************} { } { FileName : ULife.pas } { } { Author : Ian Lane (Email: lanei@ideal.net.au) } { } { Synopsis : A Delphi control which implements the old computer simulation } { of Life. Useful for about boxes, screen savers or even as the } { core of a "Life" application. } { } { See also : ILfGrid1.inc, ILfGrid2.inc, ILfHist1.inc, ILfHist2.inc } { } { Distribution : This control is free for public use and components may be } { freely descended from it as long as credit is given to the } { author. } { } { Copyright (c) 1998 Ian Lane } { } {

Classes

TLife -

Functions

Register -

Types

TDoesCellLiveEvent
TGridHeightRange
TGridWidthRange
TPermissableGridHeight
TPermissableGridWidth

Constants

AbsoluteMaxNumberOfHistoryLevels
DefaultCellColor
DefaultGridHeight
DefaultGridLineColor
DefaultGridLineStyle
DefaultGridWidth
DefaultMaxNumberOfHistoryLevels
MaxGridHeight
MaxGridWidth
MinGridHeight
MinGridWidth

Variables


Functions


procedure Register;


Types


TDoesCellLiveEvent = procedure (const X : TGridWidthRange; const Y : TGridHeightRange;
                                  const Grid : TLifeGrid; var Result : Boolean) of object

TGridHeightRange = 0..MaxGridHeight - 1

TGridWidthRange = 0..MaxGridWidth - 1

TPermissableGridHeight = MinGridHeight..MaxGridHeight

TPermissableGridWidth = MinGridWidth..MaxGridWidth

Constants

AbsoluteMaxNumberOfHistoryLevels = MaxInt

DefaultCellColor = clWindowText

Some default values

DefaultGridHeight = 10

DefaultGridLineColor = clWindowText

DefaultGridLineStyle = psDot

DefaultGridWidth = 10

DefaultMaxNumberOfHistoryLevels = 10

MaxGridHeight = 46000

MaxGridWidth = 46000

MinGridHeight = 5

The absolute minimum and maximum dimensions of the grid

MinGridWidth = 5


Variables