diff --git a/src/core/game/GameMap.ts b/src/core/game/GameMap.ts index 6081cafa3..8694afd44 100644 --- a/src/core/game/GameMap.ts +++ b/src/core/game/GameMap.ts @@ -118,7 +118,7 @@ export class GameMapImpl implements GameMap { } isValidRef(ref: TileRef): boolean { - return this.isValidCoord(this.x(ref), this.y(ref)); + return ref >= 0 && ref < this.refToX.length; } x(ref: TileRef): number {