def test_solution(self): stream = StringIO() self.assertEquals( puzzler.run(Polytrig_Test_Puzzle, output_stream=stream), 2) output = stream.getvalue() self.assert_(output.startswith(self.output)) stream.seek(0) svg_stream = StringIO() settings = Struct( read_solution = stream, svg = svg_stream, x3d = None) puzzler.read_solution(Polytrig_Test_Puzzle, settings) svg_output = svg_stream.getvalue() self.assertEquals(svg_output, self.svg_output)
#!/usr/bin/env python # $Id: pentahexes-5x24-trapezoid.py 571 2012-10-06 21:14:57Z goodger $ """ solutions""" import puzzler from puzzler.puzzles.pentahexes import Pentahexes5x24Trapezoid puzzler.run(Pentahexes5x24Trapezoid)
#!/usr/bin/env python # $Id$ """ many solutions Discovered by Peter F. Esser. """ import puzzler from puzzler.puzzles.hexatwigs import OneSidedHexatwigsElongatedHexagon26x2 puzzler.run(OneSidedHexatwigsElongatedHexagon26x2)
#!/usr/bin/env python # $Id$ """ solutions""" import puzzler from puzzler.puzzles.heptiamonds import Heptiamonds10x12ShortHexagon puzzler.run(Heptiamonds10x12ShortHexagon)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.heptiamonds import HeptiamondsHexgrid7x4 puzzler.run(HeptiamondsHexgrid7x4)
#!/usr/bin/env python # $Id$ """ 2 solutions. """ import puzzler from puzzler.puzzles.tetratwigs import TetratwigsArch puzzler.run(TetratwigsArch)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.heptiamonds import HeptiamondsHexagons2x3_7 puzzler.run(HeptiamondsHexagons2x3_7)
#!/usr/bin/env python # $Id$ """ solutions""" import puzzler from puzzler.puzzles.pentacubes import Pentacubes5x7x7OpenBox puzzler.run(Pentacubes5x7x7OpenBox)
#!/usr/bin/env python # $Id$ """ many solutions. """ import puzzler from puzzler.puzzles.pentatwigs import Pentatwigs5x3 puzzler.run(Pentatwigs5x3)
#!/usr/bin/env python # $Id$ """? (many) solutions""" import puzzler from puzzler.puzzles.polyhexes1234 import Polyhexes1234_5x8 puzzler.run(Polyhexes1234_5x8)
#!/usr/bin/env python # $Id$ """ many solutions. """ import puzzler from puzzler.puzzles.polytrigs123 import Polytrigs123Triangle5_6 puzzler.run(Polytrigs123Triangle5_6)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.quasitritwigs import QuasiTritwigsElongatedHexagon2x3_3 puzzler.run(QuasiTritwigsElongatedHexagon2x3_3)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.polycubes12345 import Polycubes12345OverlappingBlocks5 puzzler.run(Polycubes12345OverlappingBlocks5)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.heptiamonds import HeptiamondsHexgridTrefoil2 puzzler.run(HeptiamondsHexgridTrefoil2)
#!/usr/bin/env python # $Id: solid-pentominoes-spinner-block.py 571 2012-10-06 21:14:57Z goodger $ """42 solutions""" import puzzler from puzzler.puzzles.solid_pentominoes import SolidPentominoesSpinnerBlock puzzler.run(SolidPentominoesSpinnerBlock)
#!/usr/bin/env python # $Id$ """2 solutions""" import puzzler from puzzler.puzzles.pentominoes import Pentominoes3x20 puzzler.run(Pentominoes3x20)
#!/usr/bin/env python # $Id$ """ many solutions. """ import puzzler from puzzler.puzzles.pentatwigs import OneSidedPentatwigsInsetRectangle7x4_4 puzzler.run(OneSidedPentatwigsInsetRectangle7x4_4)
#!/usr/bin/env python # $Id$ """ 0 solutions. """ import puzzler from puzzler.puzzles.tetratwigs import OneSidedTetratwigsTriangle_2 puzzler.run(OneSidedTetratwigsTriangle_2)
#!/usr/bin/env python # $Id$ """ solutions""" import puzzler from puzzler.puzzles.heptiamonds import HeptiamondsHexagon4 puzzler.run(HeptiamondsHexagon4)
#!/usr/bin/env python # $Id: solid-pentominoes-condominium-b.py 571 2012-10-06 21:14:57Z goodger $ """1 solution""" import puzzler from puzzler.puzzles.solid_pentominoes import SolidPentominoesCondominiumB puzzler.run(SolidPentominoesCondominiumB)
#!/usr/bin/env python # $Id$ """ 1795 solutions total: * 72 solutions omitting H * 382 omitting J * 607 omitting L * 530 omitting N * 204 omitting Y All are perfect solutions (i.e. no pieces cross). """ import puzzler from puzzler.puzzles.tetrasticks import Tetrasticks6x6 puzzler.run(Tetrasticks6x6)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.heptiamonds import HeptiamondsHexgridRosettes1 puzzler.run(HeptiamondsHexgridRosettes1)
#!/usr/bin/env python # $Id$ """542 solutions""" import puzzler from puzzler.puzzles.quasipolytrigs12 import QuasiPolytrigs12ElongatedHexagon2x1 puzzler.run(QuasiPolytrigs12ElongatedHexagon2x1)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.quasitritwigs import QuasiTritwigsTrefoil2 puzzler.run(QuasiTritwigsTrefoil2)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.heptiamonds import HeptiamondsHexgridTriangleHexagramRing \ as puzzle puzzler.run(puzzle)
#!/usr/bin/env python # $Id$ """ many solutions """ import puzzler from puzzler.puzzles.hexatwigs import HexatwigsHexagonRing2 puzzler.run(HexatwigsHexagonRing2)
#!/usr/bin/env python # $Id$ """4,154 solutions""" import puzzler from puzzler.puzzles.hexiamonds import HexiamondsHeart puzzler.run(HexiamondsHeart)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.heptiamonds import HeptiamondsHexagons2x3_1 puzzler.run(HeptiamondsHexagons2x3_1)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.polycubes12345 import Polycubes12345OverlappingBlocks4 puzzler.run(Polycubes12345OverlappingBlocks4)
#!/usr/bin/env python # $Id$ """ solutions""" import puzzler from puzzler.puzzles.polyhexes1234 import Polyhexes1234IrregularHexagon5 puzzler.run(Polyhexes1234IrregularHexagon5)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.hexiamonds import OneSidedHexiamondsLongHexagon8x3 puzzler.run(OneSidedHexiamondsLongHexagon8x3)
#!/usr/bin/env python # $Id$ """3 solutions""" import puzzler from puzzler.puzzles.solid_pentominoes import SolidPentominoes3x3x9Ring puzzler.run(SolidPentominoes3x3x9Ring)
#!/usr/bin/env python # $Id$ """ 4 solutions. Puzzle design by Colin F. Brown. """ import puzzler from puzzler.puzzles.pentatwigs import Pentatwigs3Congruent1 puzzler.run(Pentatwigs3Congruent1)
#!/usr/bin/env python # $Id: pentacubes-2x13x13-diamond-frame.py 571 2012-10-06 21:14:57Z goodger $ """ solutions""" import puzzler from puzzler.puzzles.pentacubes import Pentacubes2x13x13DiamondFrame puzzler.run(Pentacubes2x13x13DiamondFrame)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.polyiamonds12345 import Polyiamonds12345Trapezoid1 puzzler.run(Polyiamonds12345Trapezoid1)
#!/usr/bin/env python # $Id$ """11 solutions""" import puzzler from puzzler.puzzles.hexiamonds import HexiamondsX1 puzzler.run(HexiamondsX1)
#!/usr/bin/env python # $Id$ """ solutions""" import puzzler from puzzler.puzzles.heptiamonds import Heptiamonds6x14 puzzler.run(Heptiamonds6x14)
#!/usr/bin/env python # $Id$ """ 1 solution. """ import puzzler from puzzler.puzzles.tritrigs import TritrigsTriangle1 puzzler.run(TritrigsTriangle1)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.polyiamonds12345 import OneSidedPolyiamonds12345Hexagon2 puzzler.run(OneSidedPolyiamonds12345Hexagon2)
#!/usr/bin/env python # $Id: pentacubes-plus-2x5x15.py 571 2012-10-06 21:14:57Z goodger $ """ solutions""" import puzzler from puzzler.puzzles.pentacubes import PentacubesPlus2x5x15 puzzler.run(PentacubesPlus2x5x15)
#!/usr/bin/env python # $Id$ """23 solutions""" import puzzler from puzzler.puzzles.tetrahexes import TetrahexesStaggeredRectangle7x4 puzzler.run(TetrahexesStaggeredRectangle7x4)
#!/usr/bin/env python # $Id$ """ solutions""" import puzzler from puzzler.puzzles.polyominoes1234 import Polyominoes1234_7x4PlusOne puzzler.run(Polyominoes1234_7x4PlusOne)
#!/usr/bin/env python # $Id$ """ solutions""" import puzzler from puzzler.puzzles.polyhexes1234 import Polyhexes1234IrregularHexagon5 puzzler.run(Polyhexes1234IrregularHexagon5)
#!/usr/bin/env python # $Id$ """7,302 solutions""" import puzzler from puzzler.puzzles.polyominoes45 import Polyominoes45Diamond puzzler.run(Polyominoes45Diamond)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.quasitritwigs import QuasiTritwigsTrefoil6 puzzler.run(QuasiTritwigsTrefoil6)
#!/usr/bin/env python # $Id$ """5885 solutions""" import puzzler from puzzler.puzzles.hexiamonds import HexiamondsIrregularHexagon7x8 puzzler.run(HexiamondsIrregularHexagon7x8)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.hexatwigs import HexatwigsX6 puzzler.run(HexatwigsX6)
#!/usr/bin/env python # $Id$ """24 solutions""" import puzzler from puzzler.puzzles.quasiditrigs import QuasiDitrigsSatellite puzzler.run(QuasiDitrigsSatellite)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.quasitritwigs import QuasiTritwigsSnowflake1 puzzler.run(QuasiTritwigsSnowflake1)
#!/usr/bin/env python # $Id$ """2 solutions""" import puzzler from puzzler.puzzles.pentominoes import PentominoesSkewed20x3 puzzler.run(PentominoesSkewed20x3)
#!/usr/bin/env python # $Id$ """ solutions""" import puzzler from puzzler.puzzles.heptiamonds import HeptiamondsSnowflake2 puzzler.run(HeptiamondsSnowflake2)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.pentacubes import PentacubesDiamondWall puzzler.run(PentacubesDiamondWall)
#!/usr/bin/env python # $Id$ """298 solutions""" import puzzler from puzzler.puzzles.quasiditrigs import QuasiDitrigsStarburst puzzler.run(QuasiDitrigsStarburst)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.heptiamonds import HeptiamondsHexagon8 puzzler.run(HeptiamondsHexagon8)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.polyiamonds123456 import ( Polyiamonds123456ElongatedHexagon3x5) puzzler.run(Polyiamonds123456ElongatedHexagon3x5)
#!/usr/bin/env python # $Id$ """ solutions""" import puzzler from puzzler.puzzles.pentahexes import PentahexesTriangle1 puzzler.run(PentahexesTriangle1)
#!/usr/bin/env python # $Id$ """11 solutions""" import puzzler from puzzler.puzzles.tetrahexes import TetrahexesTwoDiamonds2 puzzler.run(TetrahexesTwoDiamonds2)
#!/usr/bin/env python # $Id$ """many solutions""" import puzzler from puzzler.puzzles.heptiamonds import HeptiamondsTriangleHexRing as puzzle puzzler.run(puzzle)
#!/usr/bin/env python # $Id$ """92 solutions""" import puzzler from puzzler.puzzles.solid_pentominoes import SolidPentominoesCrossBlock1 puzzler.run(SolidPentominoesCrossBlock1)
#!/usr/bin/env python # $Id: hexahexes-triangle-1.py 571 2012-10-06 21:14:57Z goodger $ """ solutions""" import puzzler from puzzler.puzzles.hexahexes import HexahexesTriangle1 puzzler.run(HexahexesTriangle1)