当前位置: 首页>>代码示例>>Python>>正文


Python puzzler.run函数代码示例

本文整理汇总了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)
开发者ID:dc25,项目名称:puzzler,代码行数:15,代码来源:test_puzzles.py

示例2:

#!/usr/bin/env python
# $Id$

"""many solutions"""

import puzzler
from puzzler.puzzles.hexiamonds import OneSidedHexiamondsLongHexagon8x3

puzzler.run(OneSidedHexiamondsLongHexagon8x3)
开发者ID:dc25,项目名称:puzzler,代码行数:9,代码来源:one-sided-hexiamonds-long-hexagon-8x3.py

示例3:

#!/usr/bin/env python
# $Id$

"""many solutions"""

import puzzler
from puzzler.puzzles.polycubes12345 import Polycubes12345OverlappingBlocks4

puzzler.run(Polycubes12345OverlappingBlocks4)
开发者ID:dc25,项目名称:puzzler,代码行数:9,代码来源:polycubes-12345-overlapping-blocks-4.py

示例4:

#!/usr/bin/env python
# $Id$

"""
many solutions

Discovered by Peter F. Esser.
"""

import puzzler
from puzzler.puzzles.hexatwigs import OneSidedHexatwigsElongatedHexagon26x2

puzzler.run(OneSidedHexatwigsElongatedHexagon26x2)
开发者ID:dc25,项目名称:puzzler,代码行数:13,代码来源:one-sided-hexatwigs-elongated-hexagon-26x2.py

示例5:

#!/usr/bin/env python
# $Id$

"""4,154 solutions"""

import puzzler
from puzzler.puzzles.hexiamonds import HexiamondsHeart

puzzler.run(HexiamondsHeart)
开发者ID:dc25,项目名称:puzzler,代码行数:9,代码来源:hexiamonds-heart.py

示例6:

#!/usr/bin/env python
# $Id$

""" solutions"""

import puzzler
from puzzler.puzzles.heptiamonds import Heptiamonds10x12ShortHexagon

puzzler.run(Heptiamonds10x12ShortHexagon)
开发者ID:dc25,项目名称:puzzler,代码行数:9,代码来源:heptiamonds-10x12-short-hex.py

示例7:

#!/usr/bin/env python
# $Id$

"""many solutions"""

import puzzler
from puzzler.puzzles.heptiamonds import HeptiamondsHexgridTriangleHexagramRing \
     as puzzle

puzzler.run(puzzle)
开发者ID:dc25,项目名称:puzzler,代码行数:10,代码来源:heptiamonds-hexgrid-triangle-hexagram-ring.py

示例8:

#!/usr/bin/env python
# $Id$

"""many solutions"""

import puzzler
from puzzler.puzzles.heptiamonds import HeptiamondsHexgrid7x4

puzzler.run(HeptiamondsHexgrid7x4)
开发者ID:dc25,项目名称:puzzler,代码行数:9,代码来源:heptiamonds-hexgrid-7x4.py

示例9:

#!/usr/bin/env python
# $Id$

""" solutions"""

import puzzler
from puzzler.puzzles.heptiamonds import HeptiamondsHexagon4

puzzler.run(HeptiamondsHexagon4)
开发者ID:dc25,项目名称:puzzler,代码行数:9,代码来源:heptiamonds-hexagon-4.py

示例10:

#!/usr/bin/env python
# $Id$

""" solutions"""

import puzzler
from puzzler.puzzles.heptiamonds import Heptiamonds6x14

puzzler.run(Heptiamonds6x14)
开发者ID:dc25,项目名称:puzzler,代码行数:9,代码来源:heptiamonds-6x14.py

示例11:

#!/usr/bin/env python
# $Id$

""" solutions"""

import puzzler
from puzzler.puzzles.pentacubes import Pentacubes5x7x7OpenBox

puzzler.run(Pentacubes5x7x7OpenBox)
开发者ID:dc25,项目名称:puzzler,代码行数:9,代码来源:pentacubes-5x7x7-open-box.py

示例12:

#!/usr/bin/env python
# $Id$

"""many solutions"""

import puzzler
from puzzler.puzzles.polyiamonds12345 import Polyiamonds12345Trapezoid1

puzzler.run(Polyiamonds12345Trapezoid1)
开发者ID:dc25,项目名称:puzzler,代码行数:9,代码来源:polyiamonds-12345-trapezoid-1.py

示例13:

#!/usr/bin/env python
# $Id$

"""
many solutions.
"""

import puzzler
from puzzler.puzzles.pentatwigs import OneSidedPentatwigsInsetRectangle7x4_4

puzzler.run(OneSidedPentatwigsInsetRectangle7x4_4)
开发者ID:dc25,项目名称:puzzler,代码行数:11,代码来源:one-sided-pentatwigs-inset-rectangle-7x4-4.py

示例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)
开发者ID:dc25,项目名称:puzzler,代码行数:13,代码来源:pentatwigs-3-congruent-1.py

示例15:

#!/usr/bin/env python
# $Id$

"""2 solutions"""

import puzzler
from puzzler.puzzles.pentominoes import Pentominoes3x20

puzzler.run(Pentominoes3x20)
开发者ID:dc25,项目名称:puzzler,代码行数:9,代码来源:pentominoes-3x20.py


注:本文中的puzzler.run函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。