本文整理汇总了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})
示例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})
示例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})
示例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})
示例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})
示例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)
示例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})
示例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)
示例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})
示例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})
示例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})
示例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})