mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-18 02:49:26 +00:00
priortize ally ports and close ports (#335)
2x more likely to trade with ports belonging to an ally OR close. 3x more likely to trade with ports belonging to an ally AND close. Add trading tests
This commit is contained in:
@@ -1,7 +1,22 @@
|
||||
import { DefaultConfig } from "../../src/core/configuration/DefaultConfig";
|
||||
|
||||
export class TestConfig extends DefaultConfig {
|
||||
_proximityBonusPortsNb: number = 0;
|
||||
|
||||
samHittingChance(): number {
|
||||
return 1;
|
||||
}
|
||||
|
||||
radiusPortSpawn(): number {
|
||||
return 1;
|
||||
}
|
||||
|
||||
proximityBonusPortsNb(totalPorts: number): number {
|
||||
return this._proximityBonusPortsNb;
|
||||
}
|
||||
|
||||
// Specific to TestConfig
|
||||
setProximityBonusPortsNb(nb: number): void {
|
||||
this._proximityBonusPortsNb = nb;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user