---
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
export const flattenBlocks = (blocks: number[][][]): number[] => {
|
||||
const flatArray: number[] = []
|
||||
|
||||
for (const block of blocks) {
|
||||
for (let col = 0; col < 4; col++) {
|
||||
for (let row = 0; row < 4; row++) {
|
||||
flatArray.push(block[row][col])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return flatArray
|
||||
}
|
||||
Reference in New Issue
Block a user