Пример #1
0
 /// <inheritdoc />
 public virtual void OnDeath(DeathEvent evnt)
 {
 }
Пример #2
0
 public override void OnDeath(DeathEvent e)
 {
     Out.WriteLine("Death!");
 }
Пример #3
0
 ///<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)
 {
 }
Пример #4
0
 public void OnDeath(DeathEvent evnt)
 {
 }
Пример #5
0
 public override void OnDeath(DeathEvent e)
 {
     dead = true;
 }
Пример #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);
            }
        }
Пример #7
0
 public void OnDeath(DeathEvent evnt)
 {
     count(evnt);
 }
Пример #8
0
 public void OnDeath(DeathEvent evnt)
 {
 }
 public override void OnDeath(DeathEvent evnt)
 {
     PrintStats();
 }
Пример #10
0
 public override void OnDeath(DeathEvent evnt)
 {
     deaths++;
     Console.WriteLine(String.Format("Deaths = {0}, Kills = {1}", deaths, kills));
     SetNextBehavior();
 }
Пример #11
0
 public override void OnDeath(DeathEvent evnt)
 {
     publisher.publish(evnt);
 }