mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-05 13:02:31 +00:00
tiles now have lake or ocean method
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user