Esempio n. 1
0
 public int CountBlocksWithColor(int colorIndex)
 {
     return(BlocksColors.ToEnumerable().Count((block) => block == colorIndex));
 }
Esempio n. 2
0
 // TODO: change rows, cols to Size
 public Pallet(int rows, int cols, float blockSize, float frameSize = 0) :
     this(new int[rows, cols], blockSize, frameSize)
 {
     BlocksColors.Fill(ColorTable.NoColor);
 }