public void MoveOneStep(ISlmmService slmmService) { if (--slmmService.SmartMower.CurrentY < 1) { slmmService.SmartMower.CurrentY = 1; slmmService.Turn90(); slmmService.Turn90(); slmmService.SmartMower.Direction = DirectionEnum.Direction.North; slmmService.Clockwise = true; _xCoordinateService.CheckXValues(slmmService); slmmService.SlmMove = slmmService.GetSlmmMoveDirection(); } base.PrintPosition(slmmService.SmartMower); }
public void MoveOneStep(ISlmmService slmmService) { if (++slmmService.SmartMower.CurrentY > slmmService.SmartMower.MaxY) { _xCoordinateService.CheckXValues(slmmService); slmmService.Turn90(); slmmService.Turn90(); slmmService.SmartMower.Direction = DirectionEnum.Direction.South; slmmService.Clockwise = false; slmmService.SmartMower.CurrentY = slmmService.SmartMower.MaxY; slmmService.SlmMove = slmmService.GetSlmmMoveDirection(); } PrintPosition(slmmService.SmartMower); }