def load_coords(file: TextIO) -> CoordinateList: coords: CoordinateList = [] line = file.readline() for block in line.split(): coords.append(Coordinate.from_string(block)) return coords
def create_goal(string: str) -> Goal: coord, gtype = string.split(':') coord = Coordinate.from_string(coord) gtype = GoalType[gtype] return Goal(coord, gtype, Origin, Origin)
def create_scaffold(string: str) -> Tuple[Coordinate, SInstruction]: coord, stype = string.split(':') coord = Coordinate.from_string(coord) stype = SInstruction[stype] return coord, stype