summaryrefslogtreecommitdiff
path: root/src/engine/systems/Grid.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/systems/Grid.ts')
-rw-r--r--src/engine/systems/Grid.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/engine/systems/Grid.ts b/src/engine/systems/Grid.ts
index 1ec8ed9..c504bfe 100644
--- a/src/engine/systems/Grid.ts
+++ b/src/engine/systems/Grid.ts
@@ -377,4 +377,11 @@ export class Grid extends System {
this.grid[y][x].add(id);
});
}
+
+ public getCenterGrid() {
+ return {
+ x: Math.floor(this.grid[0].length / 2),
+ y: Math.floor(this.grid.length / 2),
+ };
+ }
}