Beispiel #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]);
 }
Beispiel #2
0
 public bool Equals(RobotPosition other)
 {
     return X == other.X && Y == other.Y;
 }
Beispiel #3
0
 public Robot(RobotRotator robotRotator, RobotMover robotMover)
 {
     _robotRotator = robotRotator;
     _robotPosition = new RobotPosition();
     _robotMover = robotMover;
 }