function memoryGap() { return memorySide() + memorySpace(); } function memoryGroups(c) { var items = {}; // @ts-ignore var ids = utsIndexArray(c.itemsCount); ids.forEach(function (i) { // @ts-ignore items[i] = utsFloor(Number(i) / 2); }); return items; } function memorySide() { return 50; } function memorySpace() { return 20; } function memoryItemPositions(c) { var pos = []; // @ts-ignore var ids = utsIndexArray(c.itemsCount); ids.forEach(function (i) { // @ts-ignore var row = utsFloor(Number(i) / 4); var x = memoryGap() + (Number(i) - row * 4) * memoryGap(); var y = memoryGap() + row * memoryGap(); // @ts-ignore pos.push(memoryCreatePosition(x, y)); }); return pos; }