// 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); } }
// 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); } }
public new Action getMove(CritterInfo info) { if (info.getFront() == Neighbor.OTHER) { return(Action.INFECT); } else { return(Action.LEFT); } }