public void FollowingWallOnRightWithCorner()
        {
            // put robot over the line
            TestMap1Factory.PutRobotInB(robot);
            brain.AddCommand(new GenericSingleStateCommand(new FollowingWallOnRightState(5, 10)));

            for (int t = 0; t < 30; t++)
            {
                environment.Tick();
            }

            Assert.True(robot.Location.Y < 130); // Turned along wall and moved north.
        }
Пример #2
0
        public void FollowingWallOnLeftWithCorner()
        {
            // put robot over the line
            TestMap1Factory.PutRobotInB(robot);
            brain.CurrentState = new FollowingWallOnLeftState(5, 10);

            for (int t = 0; t < 30; t++)
            {
                environment.Tick();
            }

            Assert.True(robot.Location.Y > 170); // Turned along wall and moved south.
        }