Пример #1
0
 /// <summary>
 /// Utilizes RotationUtil class - turn left
 /// </summary>
 /// <param name="d">The current direction</param>
 /// <returns>Return new direction</returns>
 protected Direction TurnLeft(Direction d)
 {
     return(RotationUtil.RotateLeft(d));
 }
Пример #2
0
        public void South_RotateLeft_ExpectEast()
        {
            Direction d = RotationUtil.RotateLeft(Direction.SOUTH);

            Assert.AreEqual(Direction.EAST, d);
        }
Пример #3
0
        public void North_RotateLeft_ExpectWest()
        {
            Direction d = RotationUtil.RotateLeft(Direction.NORTH);

            Assert.AreEqual(Direction.WEST, d);
        }
Пример #4
0
        public void West_RotateLeft_ExpectSouth()
        {
            Direction d = RotationUtil.RotateLeft(Direction.WEST);

            Assert.AreEqual(Direction.SOUTH, d);
        }
Пример #5
0
        public void East_RotateLeft_ExpectNorth()
        {
            Direction d = RotationUtil.RotateLeft(Direction.EAST);

            Assert.AreEqual(Direction.NORTH, d);
        }