예제 #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);
        }
예제 #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);
 }
예제 #3
0
파일: Bot.cs 프로젝트: etidalgo/run-a-bot
 protected internal void SetOrientation(Direction.DirectionType orientation)
 {
     Orientation = orientation;
 }
예제 #4
0
 public void _SetOrientation(Direction.DirectionType orientation)
 {
     SetOrientation(orientation);
 }
예제 #5
0
 public BotActionPlace(int x, int y, Direction.DirectionType orientation)
 {
     X = x;
     Y = y;
     Orientation = orientation;
 }