本文整理汇总了Python中puzzler.run函数的典型用法代码示例。如果您正苦于以下问题:Python run函数的具体用法?Python run怎么用?Python run使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了run函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_solution
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:
#!/usr/bin/env python
# $Id$
"""many solutions"""
import puzzler
from puzzler.puzzles.hexiamonds import OneSidedHexiamondsLongHexagon8x3
puzzler.run(OneSidedHexiamondsLongHexagon8x3)
示例3:
#!/usr/bin/env python
# $Id$
"""many solutions"""
import puzzler
from puzzler.puzzles.polycubes12345 import Polycubes12345OverlappingBlocks4
puzzler.run(Polycubes12345OverlappingBlocks4)
示例4:
#!/usr/bin/env python
# $Id$
"""
many solutions
Discovered by Peter F. Esser.
"""
import puzzler
from puzzler.puzzles.hexatwigs import OneSidedHexatwigsElongatedHexagon26x2
puzzler.run(OneSidedHexatwigsElongatedHexagon26x2)
示例5:
#!/usr/bin/env python
# $Id$
"""4,154 solutions"""
import puzzler
from puzzler.puzzles.hexiamonds import HexiamondsHeart
puzzler.run(HexiamondsHeart)
示例6:
#!/usr/bin/env python
# $Id$
""" solutions"""
import puzzler
from puzzler.puzzles.heptiamonds import Heptiamonds10x12ShortHexagon
puzzler.run(Heptiamonds10x12ShortHexagon)
示例7:
#!/usr/bin/env python
# $Id$
"""many solutions"""
import puzzler
from puzzler.puzzles.heptiamonds import HeptiamondsHexgridTriangleHexagramRing \
as puzzle
puzzler.run(puzzle)
示例8:
#!/usr/bin/env python
# $Id$
"""many solutions"""
import puzzler
from puzzler.puzzles.heptiamonds import HeptiamondsHexgrid7x4
puzzler.run(HeptiamondsHexgrid7x4)
示例9:
#!/usr/bin/env python
# $Id$
""" solutions"""
import puzzler
from puzzler.puzzles.heptiamonds import HeptiamondsHexagon4
puzzler.run(HeptiamondsHexagon4)
示例10:
#!/usr/bin/env python
# $Id$
""" solutions"""
import puzzler
from puzzler.puzzles.heptiamonds import Heptiamonds6x14
puzzler.run(Heptiamonds6x14)
示例11:
#!/usr/bin/env python
# $Id$
""" solutions"""
import puzzler
from puzzler.puzzles.pentacubes import Pentacubes5x7x7OpenBox
puzzler.run(Pentacubes5x7x7OpenBox)
示例12:
#!/usr/bin/env python
# $Id$
"""many solutions"""
import puzzler
from puzzler.puzzles.polyiamonds12345 import Polyiamonds12345Trapezoid1
puzzler.run(Polyiamonds12345Trapezoid1)
示例13:
#!/usr/bin/env python
# $Id$
"""
many solutions.
"""
import puzzler
from puzzler.puzzles.pentatwigs import OneSidedPentatwigsInsetRectangle7x4_4
puzzler.run(OneSidedPentatwigsInsetRectangle7x4_4)
示例14:
#!/usr/bin/env python
# $Id$
"""
4 solutions.
Puzzle design by Colin F. Brown.
"""
import puzzler
from puzzler.puzzles.pentatwigs import Pentatwigs3Congruent1
puzzler.run(Pentatwigs3Congruent1)
示例15:
#!/usr/bin/env python
# $Id$
"""2 solutions"""
import puzzler
from puzzler.puzzles.pentominoes import Pentominoes3x20
puzzler.run(Pentominoes3x20)