Ejemplo n.º 1
0
        public void VerifyLeftRightAction(Direction.DirectionType startOrientation, BotAction turnAction, Direction.DirectionType endOrientation)
        {
            Board board = new Board(5, 5);
            BotTest bot = new BotTest(board);
            bot._SetCoordinates(2, 2);
            bot._SetOrientation(startOrientation); 

            turnAction.Apply(bot);
            Assert.AreEqual(endOrientation, bot.Orientation);
        }
Ejemplo n.º 2
0
 public void VerifyMoveAction(Tuple<int,int> start, Direction.DirectionType orientation, Tuple<int, int> end)
 {
     Board board = new Board(5, 5);
     BotTest bot = new BotTest(board);
     bot._SetCoordinates(start.Item1, start.Item2);
     bot._SetOrientation(orientation);
     BotActionMove action = new BotActionMove();
     action.Apply(bot);
     Assert.AreEqual(end.Item1, bot.X);
     Assert.AreEqual(end.Item2, bot.Y);
 }
Ejemplo n.º 3
0
 protected internal void SetOrientation(Direction.DirectionType orientation)
 {
     Orientation = orientation;
 }
Ejemplo n.º 4
0
 public void _SetOrientation(Direction.DirectionType orientation)
 {
     SetOrientation(orientation);
 }
Ejemplo n.º 5
0
 public BotActionPlace(int x, int y, Direction.DirectionType orientation)
 {
     X = x;
     Y = y;
     Orientation = orientation;
 }