Class GreedyBot
- Namespace
- SurvivorsMaker.Balance
- Assembly
- SurvivorsMaker.Balance.dll
Bot that avoids nearby threats and scores upgrades and purchases using configurable stat weights.
public sealed class GreedyBot : RandomBot, IRunBot
- Inheritance
-
GreedyBot
- Implements
- Inherited Members
Constructors
GreedyBot(GreedyBotSettings, RandomBotSettings)
public GreedyBot(GreedyBotSettings settings = null, RandomBotSettings movement = null)
Parameters
settingsGreedyBotSettingsmovementRandomBotSettings
Fields
GreedySettings
public readonly GreedyBotSettings GreedySettings
Field Value
Properties
Name
Short name shown in reports, e.g. "random" or "greedy".
public override string Name { get; }
Property Value
Methods
ChooseLevelUp(RunState)
Index into Choices. Must be a choice the controller accepts.
public override int ChooseLevelUp(RunState run)
Parameters
runRunState
Returns
Move(SimWorld)
Movement for the next tick, length 0–1.
public override Vec2 Move(SimWorld world)
Parameters
worldSimWorld
Returns
Score(RunState, ItemDef)
Scores a prospective acquisition using the configured stat weights and current build context.
public float Score(RunState run, ItemDef item)
Parameters
Returns
Score(RunState, WeaponItemDef)
Scores a prospective acquisition using the configured stat weights and current build context.
public float Score(RunState run, WeaponItemDef weapon)
Parameters
runRunStateweaponWeaponItemDef
Returns
Shop(RunController)
Spend the shop phase through the controller (buy, reroll, lock, merge, recycle). Do not call NextWave.
public override void Shop(RunController controller)
Parameters
controllerRunController