public int CountBlocksWithColor(int colorIndex) { return(BlocksColors.ToEnumerable().Count((block) => block == colorIndex)); }
// 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); }