|
|
@@ -9,12 +9,13 @@ function memorySpace() { |
|
|
|
} |
|
|
|
function memoryItemPositions(c) { |
|
|
|
var pos = []; |
|
|
|
for (var i = 0; i < c.itemsCount; i++) { |
|
|
|
var ids = Array.from(Array(c.itemsCount).keys()); |
|
|
|
ids.forEach(function (i) { |
|
|
|
var row = Math.floor(i / 4); |
|
|
|
var x = memoryGap() + (i - row * 4) * memoryGap(); |
|
|
|
var y = memoryGap() + row * memoryGap(); |
|
|
|
// @ts-ignore |
|
|
|
pos.push(memoryCreatePosition(x, y)); |
|
|
|
} |
|
|
|
}); |
|
|
|
return pos; |
|
|
|
} |