From 48edcc6460bf17b83aee3f5418e1bfd12a03a530 Mon Sep 17 00:00:00 2001 From: Scott Anderson <662325+scottanderson@users.noreply.github.com> Date: Mon, 14 Apr 2025 21:19:12 -0400 Subject: [PATCH] GameMap --- src/core/game/GameMap.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/game/GameMap.ts b/src/core/game/GameMap.ts index 222fb1609..8e926676d 100644 --- a/src/core/game/GameMap.ts +++ b/src/core/game/GameMap.ts @@ -154,7 +154,7 @@ export class GameMapImpl implements GameMap { } hasOwner(ref: TileRef): boolean { - return this.ownerID(ref) != 0; + return this.ownerID(ref) !== 0; } setOwnerID(ref: TileRef, playerId: number): void { @@ -189,12 +189,14 @@ export class GameMapImpl implements GameMap { isOnEdgeOfMap(ref: TileRef): boolean { const x = this.x(ref); const y = this.y(ref); - return x == 0 || x == this.width() - 1 || y == 0 || y == this.height() - 1; + return ( + x === 0 || x === this.width() - 1 || y === 0 || y === this.height() - 1 + ); } isBorder(ref: TileRef): boolean { return this.neighbors(ref).some( - (tr) => this.ownerID(tr) != this.ownerID(ref), + (tr) => this.ownerID(tr) !== this.ownerID(ref), ); }