/// <summary> /// Construct a new defect array of given dimensions /// </summary> /// <param name="width"></param> /// <param name="height"></param> /// <param name="levels"></param> /// <param name="neighbourhood"></param> public DefectGrid(int width, int height, int levels, CellNeighbourhood neighbourhood) { if (levels < 2) { throw new ArgumentException("minimum 2 states"); } if (levels > 256) { throw new ArgumentException("maximum 256 states"); } this.Width = width; this.Height = height; this.Levels = levels; this.Neighbourhood = neighbourhood; this.Cells = width * height; this.Offset = width * (height + 2); this.Flip = false; InitializeBuffer(); }
/// <summary> /// Construct a new defect array of given dimensions /// </summary> /// <param name="width"></param> /// <param name="height"></param> /// <param name="levels"></param> /// <param name="neighbourhood"></param> public DefectGrid(int width, int height, int levels, CellNeighbourhood neighbourhood) { if (levels < 2) { throw new ArgumentException("minimum 2 states"); } if (levels > 256) { throw new ArgumentException("maximum 256 states"); } this.Width = width; this.Height = height; this.Levels = levels; this.Neighbourhood = neighbourhood; this.Cells = width * height; this.Offset = width * (height + 2); this.Flip = false; InitializeBuffer(); }
public HandshakeResponseMessage(CellNeighbourhood location) { Location = location; }
public NakedTweenFindingMessage(CellNeighbourhood cellNeighbourhood, List <int> pairValues) { CellNeighbourhood = cellNeighbourhood; PairValues = new ReadOnlyCollection <int>(pairValues); }
public HandshakeRequestMessage(CellNeighbourhood location) { Location = location; }