public void WhenOnRobotDeathIsCalled() { _deadRobotName = RandomHelper.RandomRobotName(); var e = new RobotDeathEvent(_deadRobotName); _brain.OnRobotDeath(e); }
public override void OnRobotDeath(RobotDeathEvent evnt) { if (Targets.ContainsKey(evnt.Name)) { Targets[evnt.Name].Live = false; } }
public override void OnRobotDeath(RobotDeathEvent deadRobot) { if (deadRobot.Name == Enemy.Name) { Enemy.Clear(); } }
public override void OnRobotDeath(RobotDeathEvent e) { if (e.Name == target.name) { target.distance = 10000; //this will effectively make us search for a new target } }
public override void OnRobotDeath(RobotDeathEvent e) { if (e.Name == target.name) { target = null; } }
public override void OnRobotDeath(RobotDeathEvent evnt) { if (HasEnemy() && evnt.Name == Enemy.Name) { Enemy.Clear(); } }
public override void OnRobotDeath(RobotDeathEvent evnt) { base.OnRobotDeath(evnt); SetTurnRadarRightRadians(360); blackBoard.CurrentEnemy = null; currentBehaviour = pushBehaviour; Execute(); }
/// <summary> /// If a robot dies, resets back to scanning /// </summary> /// <param name="bot"></param> public override void OnRobotDeath(RobotDeathEvent bot) { if (bot.Name == _currentTarget) { switchState(BotState.Scanning); _currentTarget = string.Empty; } }
public override void OnRobotDeath(RobotDeathEvent evnt) { for (int i = 0; i < behaviors.Count; ++i) { var behavior = behaviors[i]; behavior.OnRobotDeath(evnt); } }
public static void Action(NagibatorTank me, RobotDeathEvent e) { Console.WriteLine($"{nameof(OnRobotDeathModule)}: {e.Name}"); if (me.Target?.Equals(e.Name) == true) { me.Target = null; Console.WriteLine($"{nameof(OnRobotDeathModule)}: Set target to NULL"); } }
public override void OnRobotDeath(RobotDeathEvent e) { _enemies.Remove(e.Name); if (_battleStrategy.CurrentTarget != null) { if (e.Name.Equals(_battleStrategy.CurrentTarget?.Name)) { _battleStrategy.ResetTarget(); } } }
/// <summary> /// This method is called by the game whenever another robot dies. /// </summary> /// <param name="robotDeathEvent">The robot death event containing data about the robot that died.</param> public override void OnRobotDeath(RobotDeathEvent robotDeathEvent) { // Remove the scanned robot data for the robot that died. // This data is useless now, and will only confuse our robot if it stays in our scanned robot data. scannedRobotData.Remove(robotDeathEvent.Name); // Remove our global target, if our target was the robot that died, but only if we have a current target if (target != null && target.name.Equals(robotDeathEvent.Name)) { target = null; } }
public override void OnRobotDeath(RobotDeathEvent evnt) { base.OnRobotDeath(evnt); var _enemyCount = EnemyCount(); var _teamCount = TeamCount(); var _turn = 2; if (((_enemyCount <= _turn && _teamCount <= _enemyCount) || (_teamCount <= _enemyCount && _teamCount <= _turn)) && !(Stragegy is Solo)) { // Big boss come last Stragegy = new Solo(this); Stragegy.Init(); } }
public override void OnRobotDeath(RobotDeathEvent evnt) { base.OnRobotDeath(evnt); // TL go first var _enemyCount = EnemyCount(); var _teamCount = TeamCount(); var _turn = 4; if (((_enemyCount <= _turn && _teamCount <= _enemyCount) || (_teamCount <= _enemyCount && _teamCount <= _turn)) && !(Stragegy is Solo)) { Stragegy = new Solo(this); Stragegy.Init(); } }
public override void OnRobotDeath(RobotDeathEvent evnt) { Console.WriteLine("Died: " + evnt.Name); if (TargetEnemyName == evnt.Name || LastBulletHit?.Name == evnt.Name) { if (robots.ContainsKey(evnt.Name)) { robots.Remove(evnt.Name); } LastBulletHit = null; TargetEnemyName = null; CurrentPhase = RoboPhase.WallRush; } base.OnRobotDeath(evnt); }
/// <summary> /// This method is called by the game when another robot dies. /// </summary> /// <param name="robotDeathEvent">The robot death event containing data about the robot that died.</param> public override void OnRobotDeath(RobotDeathEvent robotDeathEvent) { // Gets the name of the robot that died var deadRobotName = robotDeathEvent.Name; // Remove the robot data for the robot that died from the enemy dictionary and access list enemyDictionary.Remove(deadRobotName); accessedEnemyList.Remove(deadRobotName); // Remove the data entry for the oldest scanned robot, if we have such an entry if (oldestScanned != null && oldestScanned.name.Equals(deadRobotName)) { oldestScanned = null; } if (target != null && target.name.Equals(deadRobotName)) { target = null; } }
public override void OnRobotDeath(RobotDeathEvent evnt) { }
public override void OnRobotDeath(RobotDeathEvent e) => OnRobotDeathModule.Action(this, e);
public void OnRobotDeath(RobotDeathEvent evnt) { _context.OnRobotDeath(evnt.Name); }
public override void OnRobotDeath(RobotDeathEvent evnt) { _brain.OnRobotDeath(evnt); }
public override void OnRobotDeath(RobotDeathEvent e) { enemyCount--; }
public virtual void OnRobotDeath(RobotDeathEvent evnt) { _myRobot.OnRobotDeath(evnt); }
public void OnRobotDeath(RobotDeathEvent evnt) { count(evnt); }
public override void OnRobotDeath(RobotDeathEvent e) { map.removeTarget(e.Name); }
public virtual void OnRobotDeath(RobotDeathEvent evnt) { }
public override void OnRobotDeath(RobotDeathEvent e) { //WriteQFunctionToFile(); base.OnRobotDeath(e); }
protected virtual void OnRobotDeath(RobotDeathEvent e) { }
public override void OnRobotDeath(RobotDeathEvent evnt) { _algorithm.RemoveDeadRobot(evnt.Name); }
public override void OnRobotDeath(RobotDeathEvent e) { Enemy en = ((Enemy)(this.targets[e.Name])); en.live = false; }
/// <summary> /// Handle robot death event. /// </summary> /// <param name="evnt"></param> /// <inheritdoc/> public override void OnRobotDeath(RobotDeathEvent evnt) { var name = evnt.Name; this.enemies.Remove(name); }