summaryrefslogtreecommitdiff
path: root/src/engine/systems/Grid.ts
diff options
context:
space:
mode:
authorElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-07 22:49:43 -0700
committerElizabeth Hunt <elizabeth.hunt@simponic.xyz>2024-03-07 22:49:43 -0700
commitebae24f5a3a251654a1e41be58f52ba2a777d9d7 (patch)
tree6641c3e5a5ec5d812c54be2bb38196f85f4e36c2 /src/engine/systems/Grid.ts
parent808a44e8542ebc7542d833e5a30b51b7fb8f80d5 (diff)
downloadthe-abstraction-engine-ebae24f5a3a251654a1e41be58f52ba2a777d9d7.tar.gz
the-abstraction-engine-ebae24f5a3a251654a1e41be58f52ba2a777d9d7.zip
level system!
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),
+ };
+ }
}