//strategy assumes starting point is south-west public override bool Place(int x, int y) { if (!x.Equals(_x) || !y.Equals(_y)) { return(false); } _currentPosition = new Position { X = x, Y = y }; _currentOrientation = new NorthOrientationStrategy(); Report("placed"); return(true); }
public override void ChangeRight() { _currentOrientation = _currentOrientation.TurnRight(); Report("turned right"); }
public override void ChangeLeft() { _currentOrientation = _currentOrientation.TurnLeft(); Report("turned left"); }