private void ColorCubeMap() { var a = 0; for (var x = 0; x < CUBE_SIZE; x++) { for (var y = 0; y < CUBE_SIZE; y++) { for (var z = 0; z < CUBE_SIZE; z++) { if (CubeUtils.IsInternalQb(x, y, z, CUBE_SIZE)) { continue; } var faceData = GetFaceData(_qubies[x][y][z], x, y, z); a += faceData.Count; faceData.ForEach((f) => { ColorCubeMapFace(f.faceName, f.faceX, f.faceY, f.pixelColor); }); } } } print(a); }
private void InplaceRotate(Cubie[][] mat, int slice) { var n = mat.Length; for (var x = 0; x < n / 2; x++) { for (var y = x; y < n - x - 1; y++) { if (CubeUtils.IsInternalQb(x, y, slice, (uint)n)) { continue; } var temp = mat[x][y]; mat[x][y] = mat[y][n - 1 - x]; mat[y][n - 1 - x] = mat[n - 1 - x][n - 1 - y]; mat[n - 1 - x][n - 1 - y] = mat[n - 1 - y][x]; mat[n - 1 - y][x] = temp; } } }