public int CountBlocksWithColor(int colorIndex) { return(BlocksColors.ToEnumerable().Count((block) => block == colorIndex)); }