diff --git a/shared/Swift/memoryGap.swift b/shared/Swift/memoryGap.swift deleted file mode 100644 index 02e4932..0000000 --- a/shared/Swift/memoryGap.swift +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -func memoryGap() -> Float { - return memorySide() + memorySpace() -} diff --git a/shared/Swift/memoryItemPositions.swift b/shared/Swift/memoryItemPositions.swift deleted file mode 100644 index 6fbcdc3..0000000 --- a/shared/Swift/memoryItemPositions.swift +++ /dev/null @@ -1,26 +0,0 @@ -import "./memoryGap.js" - -protocol Context { - var itemsCount: Float { get } -} - -class Position { - x: Float - y: Float - - constructor(x, y) { - this.x = x - this.y = y - } -} - -func memoryItemPositions(c: Context) -> Position[] { - var pos: Position[] = [] - for (var i = 0; i < c.itemsCount; i++) { - let row = Math.floor(i / 4) - let x = memoryGap() + (i - row * 4) * memoryGap() - let y = memoryGap() + row * memoryGap() - pos.push(new Position(x, y)) - } - return pos -} diff --git a/shared/Swift/memorySide.swift b/shared/Swift/memorySide.swift deleted file mode 100644 index 6b4fa62..0000000 --- a/shared/Swift/memorySide.swift +++ /dev/null @@ -1,3 +0,0 @@ -func memorySide() -> Float { - return 50 -} diff --git a/shared/Swift/memorySpace.swift b/shared/Swift/memorySpace.swift deleted file mode 100644 index 4134b41..0000000 --- a/shared/Swift/memorySpace.swift +++ /dev/null @@ -1,3 +0,0 @@ -func memorySpace() -> Float { - return 20 -}