Пример #1
0
def load_coords(file: TextIO) -> CoordinateList:
    coords: CoordinateList = []
    line = file.readline()
    for block in line.split():
        coords.append(Coordinate.from_string(block))
    return coords
Пример #2
0
def create_goal(string: str) -> Goal:
    coord, gtype = string.split(':')
    coord = Coordinate.from_string(coord)
    gtype = GoalType[gtype]
    return Goal(coord, gtype, Origin, Origin)
Пример #3
0
def create_scaffold(string: str) -> Tuple[Coordinate, SInstruction]:
    coord, stype = string.split(':')
    coord = Coordinate.from_string(coord)
    stype = SInstruction[stype]
    return coord, stype