Example #1
0
 // returns the move to be made by the giant
 public override Action getMove(CritterInfo info)
 {
     if (info.getFront() == Neighbor.OTHER)
     {
         return(Action.INFECT);
     }
     else if (info.getFront() != Neighbor.EMPTY)
     {
         return(Action.RIGHT);
     }
     else
     {
         return(Action.HOP);
     }
 }
Example #2
0
 // returns the move to be made by the bear
 public override Action getMove(CritterInfo info)
 {
     Console.WriteLine(info.getInfectCount() + "  Bear  ");
     if (info.getFront() == Neighbor.OTHER)
     {
         return(Action.INFECT);
     }
     else if (info.getFront() == Neighbor.EMPTY)
     {
         return(Action.HOP);
     }
     else
     {
         return(Action.LEFT);
     }
 }
Example #3
0
 public new Action getMove(CritterInfo info)
 {
     if (info.getFront() == Neighbor.OTHER)
     {
         return(Action.INFECT);
     }
     else
     {
         return(Action.LEFT);
     }
 }