// O -> Horizontal First // ↓ public static int CalculateCells(BitShape64 shape) // Support up to 8x8 { int cells = 0; for (int w = 0; w < shape.width; w++) { for (int h = 0; h < shape.height; h++) { if ((shape.value & (1 << (h * shape.width + h))) > 0) { cells++; } } } return(cells); }
// O -> Horizontal First // ↓ public static int GetShapeCoords(int offsetX, int offsetY, BitShape64 shape, (int x, int y)[] grids)