use tiles to improve perf

This commit is contained in:
evanpelle
2024-08-10 19:35:31 -07:00
parent f7b0441f41
commit dd94bb4c65
8 changed files with 64 additions and 54 deletions
+2 -2
View File
@@ -95,7 +95,7 @@ export class ClientGame {
this.renderer.initialize()
this.input.initialize()
this.executor.spawnBots(500)
this.executor.spawnBots(1000)
setInterval(() => this.tick(), 10);
@@ -148,7 +148,7 @@ export class ClientGame {
const owner = tile.owner()
const targetID = owner.isPlayer() ? owner.id() : null
if (tile.owner() != this.myPlayer) {
if (this.myPlayer.sharesBorderWith(tile.owner())) {
if (this.myPlayer.sharesBorderWith(tile.owner())) {
this.sendAttackIntent(targetID, cell)
} else {
// TODO verify on ocean