コード例 #1
0
ファイル: test_puzzles.py プロジェクト: dc25/puzzler
 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)
コード例 #3
0
#!/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
ファイル: tetratwigs-arch.py プロジェクト: dc25/puzzler
#!/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
ファイル: pentominoes-3x20.py プロジェクト: dc25/puzzler
#!/usr/bin/env python
# $Id$

"""2 solutions"""

import puzzler
from puzzler.puzzles.pentominoes import Pentominoes3x20

puzzler.run(Pentominoes3x20)
コード例 #17
0
#!/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
ファイル: heptiamonds-hexagon-4.py プロジェクト: dc25/puzzler
#!/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
ファイル: tetrasticks-6x6.py プロジェクト: dc25/puzzler
#!/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)
コード例 #23
0
#!/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)
コード例 #25
0
#!/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
ファイル: hexiamonds-heart.py プロジェクト: dc25/puzzler
#!/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)
コード例 #29
0
#!/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)
コード例 #31
0
#!/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)
コード例 #34
0
#!/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
ファイル: heptiamonds-6x14.py プロジェクト: dc25/puzzler
#!/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)
コード例 #39
0
#!/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)
コード例 #41
0
#!/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)
コード例 #43
0
#!/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
ファイル: hexatwigs-x-6.py プロジェクト: dc25/puzzler
#!/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)
コード例 #55
0
#!/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)
コード例 #59
0
#!/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)