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


Python Board._posPlusOffset方法代码示例

本文整理汇总了Python中galaxySolver.Board._posPlusOffset方法的典型用法代码示例。如果您正苦于以下问题:Python Board._posPlusOffset方法的具体用法?Python Board._posPlusOffset怎么用?Python Board._posPlusOffset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在galaxySolver.Board的用法示例。


在下文中一共展示了Board._posPlusOffset方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: testPosPlusOffsetWholeBoard

# 需要导入模块: from galaxySolver import Board [as 别名]
# 或者: from galaxySolver.Board import _posPlusOffset [as 别名]
 def testPosPlusOffsetWholeBoard(self):
     b = Board(4, 4)
     self.assertEquals(b._posPlusOffset(1, 1, 48), {"i": 7,"j": 7})
开发者ID:tuxella,项目名称:Galaxies-Solver,代码行数:5,代码来源:tests.py

示例2: testPosPlusOffsetCellToWall

# 需要导入模块: from galaxySolver import Board [as 别名]
# 或者: from galaxySolver.Board import _posPlusOffset [as 别名]
 def testPosPlusOffsetCellToWall(self):
     b = Board(4, 4)
     self.assertEquals(b._posPlusOffset(1, 1, 1), {"i": 1,"j": 2})
开发者ID:tuxella,项目名称:Galaxies-Solver,代码行数:5,代码来源:tests.py

示例3: testPosPlusOffsetCellToCrossing

# 需要导入模块: from galaxySolver import Board [as 别名]
# 或者: from galaxySolver.Board import _posPlusOffset [as 别名]
 def testPosPlusOffsetCellToCrossing(self):
     b = Board(4, 4)
     self.assertEquals(b._posPlusOffset(2, 1, 1), {"i": 2,"j": 2})
开发者ID:tuxella,项目名称:Galaxies-Solver,代码行数:5,代码来源:tests.py

示例4: testPosPlusOffsetWIthinColumn

# 需要导入模块: from galaxySolver import Board [as 别名]
# 或者: from galaxySolver.Board import _posPlusOffset [as 别名]
 def testPosPlusOffsetWIthinColumn(self):
     b = Board(4, 4)
     self.assertEquals(b._posPlusOffset(1, 1, 4), {"i": 1,"j": 5})
开发者ID:tuxella,项目名称:Galaxies-Solver,代码行数:5,代码来源:tests.py

示例5: testPosPlusOffsetMultiColumn

# 需要导入模块: from galaxySolver import Board [as 别名]
# 或者: from galaxySolver.Board import _posPlusOffset [as 别名]
 def testPosPlusOffsetMultiColumn(self):
     b = Board(4, 4)
     self.assertEquals(b._posPlusOffset(1, 1, 7), {"i": 2,"j": 1})
开发者ID:tuxella,项目名称:Galaxies-Solver,代码行数:5,代码来源:tests.py

示例6: testPosPlusOffsetOutOfRangeBorder

# 需要导入模块: from galaxySolver import Board [as 别名]
# 或者: from galaxySolver.Board import _posPlusOffset [as 别名]
 def testPosPlusOffsetOutOfRangeBorder(self):
     b = Board(4, 4)
     self.assertEquals(b._posPlusOffset(1, 1, 49), None)
开发者ID:tuxella,项目名称:Galaxies-Solver,代码行数:5,代码来源:tests.py

示例7: testPosPlusOffset

# 需要导入模块: from galaxySolver import Board [as 别名]
# 或者: from galaxySolver.Board import _posPlusOffset [as 别名]
 def testPosPlusOffset(self):
     b = Board(2, 2)
     self.assertEquals(b._posPlusOffset(1, 1, 3), {"i": 2,"j": 1})
开发者ID:tuxella,项目名称:Galaxies-Solver,代码行数:5,代码来源:tests.py

示例8: testPosPlusOffsetOutOfRange

# 需要导入模块: from galaxySolver import Board [as 别名]
# 或者: from galaxySolver.Board import _posPlusOffset [as 别名]
 def testPosPlusOffsetOutOfRange(self):
     b = Board(2, 2)
     self.assertEquals(b._posPlusOffset(1, 1, 10), None)
开发者ID:tuxella,项目名称:Galaxies-Solver,代码行数:5,代码来源:tests.py

示例9: testPosPlusOffsetExactOverflow

# 需要导入模块: from galaxySolver import Board [as 别名]
# 或者: from galaxySolver.Board import _posPlusOffset [as 别名]
 def testPosPlusOffsetExactOverflow(self):
     b = Board(3, 3)
     self.assertEquals(b._posPlusOffset(1, 5, 6), {"i": 3, "j": 1})
开发者ID:tuxella,项目名称:Galaxies-Solver,代码行数:5,代码来源:tests.py

示例10: testPosPlusOffsetLineInnerBorder

# 需要导入模块: from galaxySolver import Board [as 别名]
# 或者: from galaxySolver.Board import _posPlusOffset [as 别名]
 def testPosPlusOffsetLineInnerBorder(self):
     b = Board(3, 3)
     self.assertEquals(b._posPlusOffset(1, 5, 1), {"i": 2, "j": 1})
开发者ID:tuxella,项目名称:Galaxies-Solver,代码行数:5,代码来源:tests.py

示例11: testPosPlusZero

# 需要导入模块: from galaxySolver import Board [as 别名]
# 或者: from galaxySolver.Board import _posPlusOffset [as 别名]
 def testPosPlusZero(self):
     b = Board(4, 4)
     self.assertEquals(b._posPlusOffset(3, 2, 0), {"i": 3, "j": 2})
开发者ID:tuxella,项目名称:Galaxies-Solver,代码行数:5,代码来源:tests.py

示例12: testPosPlusOffsetLineOverflow

# 需要导入模块: from galaxySolver import Board [as 别名]
# 或者: from galaxySolver.Board import _posPlusOffset [as 别名]
 def testPosPlusOffsetLineOverflow(self):
     b = Board(4, 4)
     self.assertEquals(b._posPlusOffset(3, 2, 6), {"i": 4, "j": 1})
开发者ID:tuxella,项目名称:Galaxies-Solver,代码行数:5,代码来源:tests.py


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