Hauptprogramm
- class gropro.FileReader(input: Path)[Quellcode]
Bases:
IReaderReader implementation for a file-like object, provided at instantiation
- read() list[str][Quellcode]
Executes the actual read operation, will fail for file-not existing, etc
- class gropro.StreamReader(input: TextIO)[Quellcode]
Bases:
IReaderReader implementation for a text stream object, provided at instantiation
- read() list[str][Quellcode]
Executes the actual read operation, if this is called and nothing is written to stdin, the programm will halt until interrupted by the user or OS.
- class gropro.IReader[Quellcode]
Bases:
ABC- abstract read() list[str][Quellcode]
- class gropro.FileWriter(file: Path)[Quellcode]
Bases:
IWriterWrites to a specified file, relative and absolute paths are possible.
- write(content: list[str])[Quellcode]
Performs the actual filesystem operation, will throw any access error or similar
- writecheck() bool[Quellcode]
- class gropro.StreamWriter[Quellcode]
Bases:
IWriterWrites directly to stdout, may be piped or redirected in most shells.
- write(content: list[str])[Quellcode]
- writecheck() bool[Quellcode]
- class gropro.IWriter[Quellcode]
Bases:
ABCAbstraktion für Ausgabe Operationen
- abstract write(content: list[str])[Quellcode]
- abstract writecheck() bool[Quellcode]
- class gropro.Puzzle(teile: list[gropro.teil.Teil], dimension: tuple[int, int, int], header: list[str], ebenen: list[gropro.ebene.Ebene] = <factory>)[Quellcode]
Bases:
object- to_repr_list()[Quellcode]
Schreibe die Repräsentation gemäß der Aufgabenstellung
- gropro.load_puzzle(input: IReader) Puzzle[Quellcode]
Nimm die Eingabedaten entgegen
Validiere die Eingabedaten
Erzeuge Repräsentative Datenmodelle
Sammle alle korrekt definierten Daten in einer Puzzle Instanz
- class gropro.PuzzleSolver(puzzle: Puzzle)[Quellcode]
Bases:
object- solve() tuple[bool, int][Quellcode]
Wrapper für die Backtracking Implementation - Initialisiere anhand des übergebenen Puzzle - Lege die erste, leere Ebene ohne Vorgänger an - Sortiere die Puzzleteile - Starte das Backtracking - Ordne alle Ebenen die zu der Lösung führen dem Puzzle zu
- class gropro.Teil(name: str, elemente: list[gropro.element.Element], operations: list[gropro.operation.IOperation] = <factory>)[Quellcode]
Bases:
object- reset()[Quellcode]
- manipulate(op: IOperation)[Quellcode]
- class gropro.Ebene(dimension: int, teile: list[gropro.teil.Teil] = <factory>, lower: Optional[ForwardRef('Ebene')] = None, quer: bool = False)[Quellcode]
Bases:
object- add(t: Teil) bool[Quellcode]
Füge ein zulässiges Teil in die nächste Freie Position ein oder melde Unzulässigkeit
- fits(t: Teil) bool[Quellcode]
Weise unzulässige Teile für die nächste freie Position ab
- class gropro.Element(value: int)[Quellcode]
Bases:
objectHalte den Wert eines Puzzleelements
- classmethod flip(i: int)[Quellcode]
- class gropro.Invert[Quellcode]
Bases:
IOperation
- class gropro.Rotate[Quellcode]
Bases:
IOperation