Пример #1
0
 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)
Пример #2
0
#!/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)
Пример #4
0
#!/usr/bin/env python
# $Id$

""" solutions"""

import puzzler
from puzzler.puzzles.heptiamonds import Heptiamonds10x12ShortHexagon

puzzler.run(Heptiamonds10x12ShortHexagon)
Пример #5
0
#!/usr/bin/env python
# $Id$

"""many solutions"""

import puzzler
from puzzler.puzzles.heptiamonds import HeptiamondsHexgrid7x4

puzzler.run(HeptiamondsHexgrid7x4)
Пример #6
0
#!/usr/bin/env python
# $Id$

"""
2 solutions.
"""

import puzzler
from puzzler.puzzles.tetratwigs import TetratwigsArch

puzzler.run(TetratwigsArch)
Пример #7
0
#!/usr/bin/env python
# $Id$

"""many solutions"""

import puzzler
from puzzler.puzzles.heptiamonds import HeptiamondsHexagons2x3_7

puzzler.run(HeptiamondsHexagons2x3_7)
Пример #8
0
#!/usr/bin/env python
# $Id$

""" solutions"""

import puzzler
from puzzler.puzzles.pentacubes import Pentacubes5x7x7OpenBox

puzzler.run(Pentacubes5x7x7OpenBox)
Пример #9
0
#!/usr/bin/env python
# $Id$
"""
many solutions.
"""

import puzzler
from puzzler.puzzles.pentatwigs import Pentatwigs5x3

puzzler.run(Pentatwigs5x3)
Пример #10
0
#!/usr/bin/env python
# $Id$
"""? (many) solutions"""

import puzzler
from puzzler.puzzles.polyhexes1234 import Polyhexes1234_5x8

puzzler.run(Polyhexes1234_5x8)
Пример #11
0
#!/usr/bin/env python
# $Id$

"""
many solutions.
"""

import puzzler
from puzzler.puzzles.polytrigs123 import Polytrigs123Triangle5_6

puzzler.run(Polytrigs123Triangle5_6)
Пример #12
0
#!/usr/bin/env python
# $Id$
"""many solutions"""

import puzzler
from puzzler.puzzles.quasitritwigs import QuasiTritwigsElongatedHexagon2x3_3

puzzler.run(QuasiTritwigsElongatedHexagon2x3_3)
Пример #13
0
#!/usr/bin/env python
# $Id$

"""many solutions"""

import puzzler
from puzzler.puzzles.polycubes12345 import Polycubes12345OverlappingBlocks5

puzzler.run(Polycubes12345OverlappingBlocks5)
Пример #14
0
#!/usr/bin/env python
# $Id$

"""many solutions"""

import puzzler
from puzzler.puzzles.heptiamonds import HeptiamondsHexgridTrefoil2

puzzler.run(HeptiamondsHexgridTrefoil2)
Пример #15
0
#!/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)
Пример #16
0
#!/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)
Пример #18
0
#!/usr/bin/env python
# $Id$
"""
0 solutions.
"""

import puzzler
from puzzler.puzzles.tetratwigs import OneSidedTetratwigsTriangle_2

puzzler.run(OneSidedTetratwigsTriangle_2)
Пример #19
0
#!/usr/bin/env python
# $Id$

""" solutions"""

import puzzler
from puzzler.puzzles.heptiamonds import HeptiamondsHexagon4

puzzler.run(HeptiamondsHexagon4)
Пример #20
0
#!/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)
Пример #21
0
#!/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)
Пример #22
0
#!/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)
Пример #24
0
#!/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)
Пример #26
0
#!/usr/bin/env python
# $Id$
"""
many solutions
"""

import puzzler
from puzzler.puzzles.hexatwigs import HexatwigsHexagonRing2

puzzler.run(HexatwigsHexagonRing2)
Пример #27
0
#!/usr/bin/env python
# $Id$

"""4,154 solutions"""

import puzzler
from puzzler.puzzles.hexiamonds import HexiamondsHeart

puzzler.run(HexiamondsHeart)
Пример #28
0
#!/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)
Пример #30
0
#!/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)
Пример #32
0
#!/usr/bin/env python
# $Id$

"""3 solutions"""

import puzzler
from puzzler.puzzles.solid_pentominoes import SolidPentominoes3x3x9Ring

puzzler.run(SolidPentominoes3x3x9Ring)
Пример #33
0
#!/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)
Пример #35
0
#!/usr/bin/env python
# $Id$

"""many solutions"""

import puzzler
from puzzler.puzzles.polyiamonds12345 import Polyiamonds12345Trapezoid1

puzzler.run(Polyiamonds12345Trapezoid1)
Пример #36
0
#!/usr/bin/env python
# $Id$
"""11 solutions"""

import puzzler
from puzzler.puzzles.hexiamonds import HexiamondsX1

puzzler.run(HexiamondsX1)
Пример #37
0
#!/usr/bin/env python
# $Id$

""" solutions"""

import puzzler
from puzzler.puzzles.heptiamonds import Heptiamonds6x14

puzzler.run(Heptiamonds6x14)
Пример #38
0
#!/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)
Пример #40
0
#!/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)
Пример #42
0
#!/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)
Пример #44
0
#!/usr/bin/env python
# $Id$
"""7,302 solutions"""

import puzzler
from puzzler.puzzles.polyominoes45 import Polyominoes45Diamond

puzzler.run(Polyominoes45Diamond)
Пример #45
0
#!/usr/bin/env python
# $Id$

"""many solutions"""

import puzzler
from puzzler.puzzles.quasitritwigs import QuasiTritwigsTrefoil6

puzzler.run(QuasiTritwigsTrefoil6)
Пример #46
0
#!/usr/bin/env python
# $Id$
"""5885 solutions"""

import puzzler
from puzzler.puzzles.hexiamonds import HexiamondsIrregularHexagon7x8

puzzler.run(HexiamondsIrregularHexagon7x8)
Пример #47
0
#!/usr/bin/env python
# $Id$

"""many solutions"""

import puzzler
from puzzler.puzzles.hexatwigs import HexatwigsX6

puzzler.run(HexatwigsX6)
Пример #48
0
#!/usr/bin/env python
# $Id$
"""24 solutions"""

import puzzler
from puzzler.puzzles.quasiditrigs import QuasiDitrigsSatellite

puzzler.run(QuasiDitrigsSatellite)
Пример #49
0
#!/usr/bin/env python
# $Id$

"""many solutions"""

import puzzler
from puzzler.puzzles.quasitritwigs import QuasiTritwigsSnowflake1

puzzler.run(QuasiTritwigsSnowflake1)
Пример #50
0
#!/usr/bin/env python
# $Id$
"""2 solutions"""

import puzzler
from puzzler.puzzles.pentominoes import PentominoesSkewed20x3

puzzler.run(PentominoesSkewed20x3)
Пример #51
0
#!/usr/bin/env python
# $Id$

""" solutions"""

import puzzler
from puzzler.puzzles.heptiamonds import HeptiamondsSnowflake2

puzzler.run(HeptiamondsSnowflake2)
Пример #52
0
#!/usr/bin/env python
# $Id$
"""many solutions"""

import puzzler
from puzzler.puzzles.pentacubes import PentacubesDiamondWall

puzzler.run(PentacubesDiamondWall)
Пример #53
0
#!/usr/bin/env python
# $Id$

"""298 solutions"""

import puzzler
from puzzler.puzzles.quasiditrigs import QuasiDitrigsStarburst

puzzler.run(QuasiDitrigsStarburst)
Пример #54
0
#!/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)
Пример #56
0
#!/usr/bin/env python
# $Id$

""" solutions"""

import puzzler
from puzzler.puzzles.pentahexes import PentahexesTriangle1

puzzler.run(PentahexesTriangle1)
Пример #57
0
#!/usr/bin/env python
# $Id$

"""11 solutions"""

import puzzler
from puzzler.puzzles.tetrahexes import TetrahexesTwoDiamonds2

puzzler.run(TetrahexesTwoDiamonds2)
Пример #58
0
#!/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)
Пример #60
0
#!/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)