public void Init() { this.robot = Robot.Of(new Coordinate(0, 1, "Est")); robotWest = Robot.Of(new Coordinate(0, 3, "West")); robotMapList = new LinkedList <Robot>(); robotMapList.AddFirst(this.robot); robotMapList.AddFirst(robotWest); robotMap = new RobotMap(robotMapList); }
public void Should_Refacto_Coordinate() { Robot robotEst = Robot.Of(new Coordinate(0, 1, "Est")); Robot robotWests = Robot.Of(new Coordinate(1, 1, "West")); var robotList = new LinkedList <Robot>(); robotList.AddFirst(robotEst); robotList.AddFirst(robotWests); var robotMap = new RobotMap(robotList); robotEst.MoveForward(); Check.That(robotEst.Coordinate.Column).IsEqualTo(2); }
public void Should_Move_South() { Robot robotSouth = Robot.Of(new Coordinate(1, 1, "South")); Robot robotWest = Robot.Of(new Coordinate(1, 2, "West")); var robotList = new LinkedList <Robot>(); robotList.AddFirst(robotSouth); robotList.AddFirst(robotWest); var robotMap = new RobotMap(robotList); robotSouth.MoveForward(); Check.That(robotSouth.Coordinate.Line).IsEqualTo(2); }