tiles now have lake or ocean method

This commit is contained in:
evanpelle
2024-08-23 17:53:55 -07:00
parent f52b62a354
commit 41d7c77d2d
14 changed files with 89 additions and 70 deletions
+1 -1
View File
@@ -117,7 +117,7 @@ export class BoatAttackExecution implements Execution {
}
private closestShoreTileToTarget(player: Player, target: Cell): Tile | null {
const shoreTiles = Array.from(player.borderTiles()).filter(t => t.onShore())
const shoreTiles = Array.from(player.borderTiles()).filter(t => t.onShore() && t.neighbors().filter(n => n.isOcean()).length > 0)
if (shoreTiles.length == 0) {
return null
}