update alliance()

This commit is contained in:
Evan
2024-11-25 14:10:17 -08:00
parent a1b1c5959c
commit 9af75331e2
2 changed files with 4 additions and 3 deletions
+1 -3
View File
@@ -80,9 +80,7 @@ export class NukeExecution implements Execution {
const mp = this.mg.player(owner.id())
mp.relinquish(tile)
mp.removeTroops(ratio[mp.id()])
if (owner != this.player) {
others.add(mp)
}
others.add(mp)
}
}
for (const other of others) {
+3
View File
@@ -152,6 +152,9 @@ export class PlayerImpl implements MutablePlayer {
}
allianceWith(other: Player): MutableAlliance | null {
if (other == this) {
return null
}
return this.alliances().find(a => a.recipient() == other || a.requestor() == other)
}