Esempio n. 1
0
 /// <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();
 }
Esempio n. 2
0
 /// <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();
 }
Esempio n. 3
0
 public HandshakeResponseMessage(CellNeighbourhood location)
 {
     Location = location;
 }
Esempio n. 4
0
 public NakedTweenFindingMessage(CellNeighbourhood cellNeighbourhood, List <int> pairValues)
 {
     CellNeighbourhood = cellNeighbourhood;
     PairValues        = new ReadOnlyCollection <int>(pairValues);
 }
Esempio n. 5
0
 public HandshakeRequestMessage(CellNeighbourhood location)
 {
     Location = location;
 }