// STATES -------------------------------------------------------------------------------------------- public void SetState(CellState cellState) { //if (isInitialized) throw new InvalidOperationException("Cell was already initialized!"); //check if this state is one of the finite states of this cell if (!finiteStates.Contains(cellState)) { throw new InvalidOperationException(string.Format("The specified state: {0} is invalid for this type of cell! Please use one of the following: {1}", cellState, PresentationUtils.ListToString(finiteStates))); } //if it is valid, initialize the cell this.cellState = cellState; isInitialized = true; }
public override String ToString() { return("Random State Configuration distributing randomly the following Cell states: " + PresentationUtils.ListToString(states)); }
public override String ToString() { return("Dead cell comes to life when it has exactly " + PresentationUtils.ListToString <int>(LivingNeighborsRequirements) + " living neighbors"); }
public override String ToString() { return("A living cell remains alive only when surrounded by " + PresentationUtils.ListToString <int>(LivingNeighborsRequirements) + " living neighbors"); }