cayleypy.GapPuzzles
- class cayleypy.GapPuzzles[source]
Library of puzzles defined in GAP format.
Supported puzzles: [‘10x10x10’, ‘11x11x11’, ‘12x12x12’, ‘13x13x13’, ‘20x20x20’, ‘2x2x2’, ‘2x2x2_+_dino’, ‘2x2x2_+_dino_+_little_chop’, ‘2x2x2_+_little_chop’, ‘30x30x30’, ‘3x3x3’, ‘40x40x40’, ‘4x4x4’, ‘5x5x5’, ‘6x6x6’, ‘7x7x7’, ‘8x8x8’, ‘9x9x9’, “Christopher’s_jewel”, “Eitan’s_star”, ‘FTO’, ‘Icosaminx’, ‘Jing_pyraminx’, ‘Redicosahedron’, ‘Redicosahedron_with_centers’, ‘Regular_Astrominx’, ‘Regular_Astrominx_+_Big_Chop’, “Trajber’s_octahedron”, ‘big_chop’, ‘chopasaurus’, ‘compy_cube’, ‘curvy_copter’, ‘dino’, ‘dino_+_little_chop’, ‘elite_pentultimate’, ‘emperor_pyraminx’, ‘emperor_tetraminx’, ‘examinx’, ‘gigaminx’, ‘helicopter’, ‘icosamate’, ‘little_chop’, ‘master_FTO’, ‘master_pentultimate’, ‘master_pyraminx’, ‘master_pyramorphix’, ‘master_skewb’, ‘master_tetraminx’, ‘mastermorphix’, ‘megaminx’, ‘megaminx_+_chopasaurus’, ‘octastar’, ‘pentultimate’, ‘petaminx’, ‘professor_pyraminx’, ‘professor_skewb’, ‘professor_tetraminx’, ‘pyraminx’, ‘pyraminx_crystal’, ‘pyramorphix’, ‘radio_chop’, ‘royal_pyraminx’, ‘royal_tetraminx’, ‘skewb’, ‘skewb_diamond’, ‘starminx’, ‘starminx_2’, ‘starminx_combo’, ‘teraminx’, ‘tetraminx’, ‘yottaminx’, ‘zetaminx’].
- __init__()
Methods
__init__
()Path where all GAP files are stored.
Lists puzzles that can be loaded with
GapPuzzles.puzzle
.load_puzzle_from_file
(file_name)Reads puzzle from given file in GAP format.
puzzle
(puzzle_name[, make_inverse_closed])Loads puzzle by name.
- static get_gaps_dir() Path [source]
Path where all GAP files are stored.
Only puzzles in “defaults” subfolder can be loaded with GapPuzzles.puzzle. Puzzles in other subfolders can be loaded with
GapPuzzles.load_puzzle_from_file
.
- static load_puzzle_from_file(file_name: str | Path) CayleyGraphDef [source]
Reads puzzle from given file in GAP format.
- static puzzle(puzzle_name: str, make_inverse_closed: bool = True) CayleyGraphDef [source]
Loads puzzle by name.
- Parameters:
puzzle_name – Puzzle name.
make_inverse_closed – Whether to make graph inverse-closed (if it was not already).
- Returns:
CayleyGraphDef for this puzzle.