Esempio n. 1
0
        public void WhenRobotStraysOutOfArena_AnExceptionThrown()
        {
            BattleArena arena  = new BattleArena(0, 0);
            Robot       robot1 = new Robot(0, 0, Orientation.North);

            IRobot newRobotPosition = robot1.Move();

            arena.UpdateRobotPosition(robot1, newRobotPosition);
        }
Esempio n. 2
0
        public void WhenRobotCollidesWithRobot_AnExceptionThrown()
        {
            BattleArena arena  = new BattleArena(5, 5);
            Robot       robot1 = new Robot(0, 1, Orientation.North);
            Robot       robot2 = new Robot(0, 0, Orientation.North);

            arena.AddRobot(robot1);
            arena.AddRobot(robot2);
            IRobot newRobotPosition = robot2.Move();

            arena.UpdateRobotPosition(robot2, newRobotPosition);
        }