Class RandomBot
- Namespace
- SurvivorsMaker.Balance
- Assembly
- SurvivorsMaker.Balance.dll
Seeded bot that periodically changes direction and randomly selects valid upgrades and purchases.
public class RandomBot : IRunBot
- Inheritance
-
RandomBot
- Implements
- Derived
- Inherited Members
Constructors
RandomBot(RandomBotSettings)
public RandomBot(RandomBotSettings settings = null)
Parameters
settingsRandomBotSettings
Fields
Direction
protected Vec2 Direction
Field Value
Random
protected SimRandom Random
Field Value
Settings
public readonly RandomBotSettings Settings
Field Value
ShopRules
public IShopRules ShopRules
Field Value
Properties
Name
Short name shown in reports, e.g. "random" or "greedy".
public virtual string Name { get; }
Property Value
Methods
Accepts(RunState, LevelUpChoice)
protected bool Accepts(RunState run, LevelUpChoice choice)
Parameters
runRunStatechoiceLevelUpChoice
Returns
Begin(RunState, SimRandom)
public virtual void Begin(RunState run, SimRandom random)
Parameters
ChooseLevelUp(RunState)
Index into Choices. Must be a choice the controller accepts.
public virtual int ChooseLevelUp(RunState run)
Parameters
runRunState
Returns
Merge(RunController)
protected void Merge(RunController controller)
Parameters
controllerRunController
Move(SimWorld)
Movement for the next tick, length 0–1.
public virtual Vec2 Move(SimWorld world)
Parameters
worldSimWorld
Returns
Reflect(SimWorld, Vec2, float)
protected static Vec2 Reflect(SimWorld world, Vec2 direction, float margin)
Parameters
Returns
Shop(RunController)
Spend the shop phase through the controller (buy, reroll, lock, merge, recycle). Do not call NextWave.
public virtual void Shop(RunController controller)
Parameters
controllerRunController