示例#1
0
文件: Pallet.cs 项目: KFlaga/Mozaic
 public int CountBlocksWithColor(int colorIndex)
 {
     return(BlocksColors.ToEnumerable().Count((block) => block == colorIndex));
 }
示例#2
0
文件: Pallet.cs 项目: KFlaga/Mozaic
 // 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);
 }