public void SuccessTest1() { var maximumX = 1; var maximumY = 2; var plateau = new Plateau(maximumX, maximumY); Assert.AreEqual(0, plateau.MinimumXCoordinate); Assert.AreEqual(0, plateau.MinimumYCoordinate); Assert.AreEqual(maximumX, plateau.MaximumXCoordinate); Assert.AreEqual(maximumY, plateau.MaximumYCoordinate); }
/// <summary> /// Initializes a rover with the specified values /// </summary> /// <param name="xCoordinate">Rover's initial X coordinate</param> /// <param name="yCoordinate">Rover's initial Y coordinate</param> /// <param name="heading">Rover's initial heading direction</param> /// <param name="plateau">Plateau that the rover is on</param> public Rover(long xCoordinate, long yCoordinate, Direction heading, Plateau plateau) : this(xCoordinate, yCoordinate, heading) { SetPlateau(plateau); }
/// <summary> /// Creates input with specified plateau and rovers /// </summary> /// <param name="plateau">Plateau on which the rovers roam</param> /// <param name="rovers">Rovers on the plateau</param> /// <param name="commandSets">Sets of commands for the rovers</param> public Input(Plateau plateau, List <Rover> rovers, List <CommandSet> commandSets) { Plateau = plateau ?? throw new ArgumentNullException(nameof(plateau)); Rovers = rovers ?? throw new ArgumentNullException(nameof(rovers)); CommandSets = commandSets ?? throw new ArgumentNullException(nameof(commandSets)); }