Exemple #1
0
 /// <inheritdoc />
 public virtual void OnDeath(DeathEvent evnt)
 {
 }
Exemple #2
0
 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)
 {
 }
Exemple #4
0
 public void OnDeath(DeathEvent evnt)
 {
 }
 public override void OnDeath(DeathEvent e)
 {
     dead = true;
 }
Exemple #6
0
        /// <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);
 }
Exemple #8
0
 public void OnDeath(DeathEvent evnt)
 {
 }
 public override void OnDeath(DeathEvent evnt)
 {
     PrintStats();
 }
Exemple #10
0
 public override void OnDeath(DeathEvent evnt)
 {
     deaths++;
     Console.WriteLine(String.Format("Deaths = {0}, Kills = {1}", deaths, kills));
     SetNextBehavior();
 }
Exemple #11
0
 public override void OnDeath(DeathEvent evnt)
 {
     publisher.publish(evnt);
 }