public override CleanStatus Clean() { _algorithmEssentials.RobotVisitMonitor.AddCurrentPositionToVisitList(); RobotUtility.TurnLeft(_algorithmEssentials); bool canMove = true; while (canMove) { canMove = _handlerManager.HandleNextMove(); } Status = CleanStatus.Complete; return(CleanStatus.Complete); }
public override ReturnStatus ReturnToStartPoint() { TurnRobotToFaceTheCorrectSide(); bool canMove = true; while (canMove) { canMove = _handlerManager.HandleNextMove(); // check if the robot had reached (0,0) and come out of the loop if ((_algorithmEssentials.Robot.GetCurrentCell().X == 0) && (_algorithmEssentials.Robot.GetCurrentCell().Y == 0)) { canMove = false; } } Status = ReturnStatus.Complete; return(ReturnStatus.Complete); }