예제 #1
0
        public void TurnLeftWhenFacingWest(int startXCord, int startYCord)
        {
            const Heading startingHeading = Heading.West;

            var         command = new TurnLeft();
            RobotVector result  = command.GenerateNewVector(new RobotVector(new Position(startXCord, startYCord), startingHeading));

            DirectionAssertions.AssertHasTurnedToFaceSouth(startXCord, startYCord, result);
        }
예제 #2
0
        public void TurnRightWhenFacingNorth(int startXCord, int startYCord)
        {
            const Heading startingHeading = Heading.North;

            var         command = new TurnRight();
            RobotVector result  = command.GenerateNewVector(new RobotVector(new Position(startXCord, startYCord), startingHeading));

            DirectionAssertions.AssertHasTurnedToFaceEast(startXCord, startYCord, result);
        }