本文整理汇总了Python中myrmidon.Game.point_in_rectangle方法的典型用法代码示例。如果您正苦于以下问题:Python Game.point_in_rectangle方法的具体用法?Python Game.point_in_rectangle怎么用?Python Game.point_in_rectangle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myrmidon.Game
的用法示例。
在下文中一共展示了Game.point_in_rectangle方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_returns_false_when_point_on_right_edge
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import point_in_rectangle [as 别名]
def test_returns_false_when_point_on_right_edge(self):
self.assertFalse(Game.point_in_rectangle((10, 0), (-2, -3), (10, 12)))
示例2: test_returns_false_when_point_is_east_of_rectangle
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import point_in_rectangle [as 别名]
def test_returns_false_when_point_is_east_of_rectangle(self):
self.assertFalse(Game.point_in_rectangle((14, 1), (-2, -3), (10, 12)))
示例3: test_returns_false_when_point_is_south_west_of_rectangle
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import point_in_rectangle [as 别名]
def test_returns_false_when_point_is_south_west_of_rectangle(self):
self.assertFalse(Game.point_in_rectangle((-5, 13), (-2, -3), (10, 12)))
示例4: test_returns_false_when_point_is_north_of_rectangle
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import point_in_rectangle [as 别名]
def test_returns_false_when_point_is_north_of_rectangle(self):
self.assertFalse(Game.point_in_rectangle((0, -5), (-2, -3), (10, 12)))
示例5: test_returns_true_when_point_inside_rectangle
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import point_in_rectangle [as 别名]
def test_returns_true_when_point_inside_rectangle(self):
self.assertTrue(Game.point_in_rectangle((5, 6), (-2, -3), (10, 12)))