예제 #1
0
파일: Robot.cs 프로젝트: hibri/RobotWars
 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]);
 }
예제 #2
0
 public bool Equals(RobotPosition other)
 {
     return X == other.X && Y == other.Y;
 }
예제 #3
0
파일: Robot.cs 프로젝트: hibri/RobotWars
 public Robot(RobotRotator robotRotator, RobotMover robotMover)
 {
     _robotRotator = robotRotator;
     _robotPosition = new RobotPosition();
     _robotMover = robotMover;
 }