mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-07 09:25:58 +00:00
get eaten if surrounded by same player while on lake
This commit is contained in:
@@ -127,8 +127,12 @@ export class PlayerExecution implements Execution {
|
||||
private surroundedBySamePlayer(cluster: Set<TileRef>): false | Player {
|
||||
const enemies = new Set<number>();
|
||||
for (const tile of cluster) {
|
||||
const isOceanShore = this.mg.isOceanShore(tile);
|
||||
if (this.mg.isShore(tile) && !isOceanShore) {
|
||||
continue;
|
||||
}
|
||||
if (
|
||||
this.mg.isOceanShore(tile) ||
|
||||
isOceanShore ||
|
||||
this.mg.isOnEdgeOfMap(tile) ||
|
||||
this.mg.neighbors(tile).some((n) => !this.mg.hasOwner(n))
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user