more efficient port calculation, npcs send fewer boats, fewer trade ships

This commit is contained in:
Evan
2024-11-22 14:42:48 -08:00
parent 45ff069d2c
commit 3f27f6e72c
4 changed files with 26 additions and 9 deletions
+7 -1
View File
@@ -95,7 +95,13 @@ export class FakeHumanExecution implements Execution {
const enemyborder = Array.from(this.player.borderTiles()).flatMap(t => t.neighbors()).filter(t => t.hasOwner() && t.owner() != this.player)
if (enemyborder.length == 0 || this.random.chance(5)) {
if (enemyborder.length == 0) {
if (this.random.chance(5)) {
this.sendBoat()
}
return
}
if (this.random.chance(10)) {
this.sendBoat()
return
}