Ejemplo n.º 1
0
 public void ParsePosition(string initialPositionInput)
 {
     string[] initialPositionCommandParts = initialPositionInput.Split(' ');
     _robotPosition = new RobotPosition
     {
         X = Int32.Parse(initialPositionCommandParts[0]),
         Y = Int32.Parse(initialPositionCommandParts[1])
     };
     _heading = Convert.ToChar(initialPositionCommandParts[2]);
 }
Ejemplo n.º 2
0
 public bool Equals(RobotPosition other)
 {
     return X == other.X && Y == other.Y;
 }
Ejemplo n.º 3
0
 public Robot(RobotRotator robotRotator, RobotMover robotMover)
 {
     _robotRotator = robotRotator;
     _robotPosition = new RobotPosition();
     _robotMover = robotMover;
 }