public void TestCoordinateStepsWestDecreasesX() { var start = new Coordinate { X = 10, Y = 10 }; start.OneStep(CardinalDirection.West); RobotAssert.AreEqual(start, 9, 10); }
public void TestCoordinateStepsNorthIncreasesY() { var start = new Coordinate { X = 10, Y = 10 }; start.OneStep(CardinalDirection.North); RobotAssert.AreEqual(start, 10, 11); }
public void TestCoordinateStepsSouthDecreasesY() { var start = new Coordinate { X = 10, Y = 10 }; start.OneStep(CardinalDirection.South); RobotAssert.AreEqual(start, 10, 9); }
/// <summary> /// Compare the X and Y value of a Coordinate with two integers /// </summary> /// <param name="a"></param> /// <param name="x"></param> /// <param name="y"></param> public static void AreEqual(Coordinate a, int x, int y) { Assert.AreEqual(a.X, x); Assert.AreEqual(a.Y, y); }