示例#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
 public Bot(Board board)
 {
     IsPlaced = false;
     Board = board;
 }
示例#4
0
        public BotTest(Board board) :
            base(board)
        {

        }