public CellModel(CellStateModel cellState, CellStateModel aliveState, CellStateModel deadState) : this() { State = cellState; AliveState = aliveState; DeadState = deadState; }
public CellModel(int id, int columnNumber, int rowNumber, CellStateModel cellState, CellStateModel aliveState, CellStateModel deadState) : this(cellState, aliveState, deadState) { Id = id; ColumnNumber = columnNumber; RowNumber = rowNumber; }
public CellModel(bool isAlive, CellStateModel aliveState, CellStateModel deadState) : this() { AliveState = aliveState; DeadState = deadState; State = isAlive ? AliveState : DeadState; }
public CellStateModel(CellStateModel obj) { if (randomRgb == null) { randomRgb = new Random(); } Id = obj.Id; Color = obj.Color; }
public CellGrid2DModel(int columnCount, int rowCount, CellNeighborhoodTypeModel neighborhoodType, RuleModel rule, BoundaryConditionModel boundaryCondition) { ColumnCount = columnCount; RowCount = rowCount; ZeroState = new CellStateModel(); AliveState = new CellStateModel(1); AliveState.SetColor(System.Windows.Media.Colors.RoyalBlue); NeighborhoodType = neighborhoodType; Rule = rule; BoundaryCondition = boundaryCondition; CurrentState = new List <List <ICell> >(); PreviousState = new List <List <ICell> >(); CreateNewCellsForCurrentState(); CreateRowsInPreviousState(); AddNeighboringCellsToCellsState(CurrentState); }