public PositionVector Rotate(PositionVector currentPositionVector, char orientation) { PositionVector updatedPositionVector = currentPositionVector; updatedPositionVector = RotateDict[orientation].Rotate(currentPositionVector); return(updatedPositionVector); }
public PositionVector StepForward(PositionVector currentPositionVector, Coordinate maxCoordinateToRove) { PositionVector updatedPositionVector = currentPositionVector; updatedPositionVector = StepForwardDict[currentPositionVector.Direction].StepForward(currentPositionVector, maxCoordinateToRove); return(updatedPositionVector); }
public PositionVector StepForward(PositionVector currentPositionVector, Coordinate maxCoordinateToRove) { PositionVector updatedPositionVector = currentPositionVector; updatedPositionVector.Coordinate.X = currentPositionVector.Coordinate.X + 1; if (updatedPositionVector.Coordinate.CheckBounds(maxCoordinateToRove) == false) { return(updatedPositionVector); } return(currentPositionVector); }
public PositionVector Rotate(PositionVector currentPositionVector) { PositionVector updatedLocationVector = currentPositionVector; if ((int)updatedLocationVector.Direction == 0) { updatedLocationVector.Direction = (Direction)7; } else { updatedLocationVector.Direction = (Direction)updatedLocationVector.Direction - 1; } return(updatedLocationVector); }