/// <inheritdoc /> public virtual void OnDeath(DeathEvent evnt) { }
public override void OnDeath(DeathEvent e) { Out.WriteLine("Death!"); }
///<summary> /// This method is called if your robot dies. /// <p /> /// You should override it in your robot if you want to be informed of this /// event. Actions will have no effect if called from this section. The /// intent is to allow you to perform calculations or print something out /// when the robot is killed. /// <seealso cref="DeathEvent"/> /// <seealso cref="Event"/> ///</summary> /// <param name="evnt">the death event set by the game</param> public override void OnDeath(DeathEvent evnt) { }
public void OnDeath(DeathEvent evnt) { }
public override void OnDeath(DeathEvent e) { dead = true; }
/// <summary> /// onDeath: We died. Decide whether to try a different corner next game. /// </summary> public override void OnDeath(DeathEvent e) { // Well, others should never be 0, but better safe than sorry. if (others == 0) { return; } // If 75% of the robots are still alive when we die, we'll switch corners. if ((others - Others)/(double) others < .75) { corner += 90; if (corner == 270) { corner = -90; } Out.WriteLine("I died and did poorly... switching corner to " + corner); } else { Out.WriteLine("I died but did well. I will still use corner " + corner); } }
public void OnDeath(DeathEvent evnt) { count(evnt); }
public override void OnDeath(DeathEvent evnt) { PrintStats(); }
public override void OnDeath(DeathEvent evnt) { deaths++; Console.WriteLine(String.Format("Deaths = {0}, Kills = {1}", deaths, kills)); SetNextBehavior(); }
public override void OnDeath(DeathEvent evnt) { publisher.publish(evnt); }