private void InvokeOnMove(MoveInfo info, ITactics tactics) { MoveMade move = OnMove; if (move != null) { move(info, tactics); } }
//TODO: remove dirty hack public override void Start(State state, ITactics ts) { index = tactics.FindIndex(x => x.ShouldBeStarted(state)); if (index == -1) { index = 0; } tactics[index].Start(state, ts); }
private void AddToHistory(MoveInfo info, ITactics source) { if (source is RollbackTactics) { return; } if (history.Count > 0 && history.Peek().Destination == info.Destination) { return; } if (source is DefaultTactics || source is DeadlyTactics) { history.Clear(); } history.Push(info); }
public override void Start(State state, ITactics prev) { prev.Priority += 0.05; }
public void AddInnerTactics(ITactics t) { tactics.Add(t); }
public override void Start(State state, ITactics tactics) { timesLeft = initialTimes; }
public virtual void Start(State state, ITactics prev) { }
public override void Start(State state, ITactics tactics) { index = 1 + WayPoints.FindIndex(x => x.Coordinates == state.Fighter.Coordinates); }