This commit is contained in:
Михаил Капелько
2023-06-06 19:47:31 +03:00
parent 40661cead1
commit e999a79be4
4 changed files with 22 additions and 24 deletions

View File

@@ -1,17 +1,4 @@
var Position = /** @class */ (function () {
function Position(x, y) {
this.x = x;
this.y = y;
}
return Position;
}());
function memoryItemPositions(c) {
var pos = [];
for (var i = 0; i < c.itemsCount; i++) {
var row = Math.floor(i / 4);
var x = memoryGap() + (i - row * 4) * memoryGap();
var y = memoryGap() + row * memoryGap();
pos.push(new Position(x, y));
}
return pos;
// @ts-nocheck
function memoryGap() {
return memorySide() + memorySpace();
}

View File

@@ -1,3 +1,5 @@
import "./memoryGap.js"
protocol Context {
var itemsCount: Float { get }
}