override public void Apply(Bot bot) { // Need more generic way to output Console.WriteLine("{0}, {1}, {2}", bot.X, bot.Y, bot.Orientation.ToString()); }
abstract public void Apply(Bot bot);
override public void Apply(Bot bot) { var newXY = newCoords[bot.Orientation](Tuple.Create(bot.X, bot.Y)); int newX = newXY.Item1; int newY = newXY.Item2; if (bot.Board.IsValidMove(newX, newY)) { bot.SetCoordinates(newX, newY); } }
override public void Apply(Bot bot) { bot.SetOrientation(newDirection[bot.Orientation]); }
override public void Apply(Bot bot) { bot.SetCoordinates(X, Y); bot.SetOrientation(Orientation); }