本文整理汇总了Python中World.addLine方法的典型用法代码示例。如果您正苦于以下问题:Python World.addLine方法的具体用法?Python World.addLine怎么用?Python World.addLine使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类World
的用法示例。
在下文中一共展示了World.addLine方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: buildWorld
# 需要导入模块: import World [as 别名]
# 或者: from World import addLine [as 别名]
def buildWorld():
world = World(20, 10)
world.addLine(1, 5, 10, 5)
world.addLine(11, 5, 19, 5)
world.addLine(1, 7, 19, 7)
world.addLine(5, 5.3, 5, 6)
world.addLine(5, 6, 5.5, 6)
world.addLine(5.5, 6, 5.5, 5.3)
world.addLine(5, 5.3, 5.5, 5.3)
world.addBox(10.5,3)
#polyline = [[1,6],[10.5,6],[10.5,3]]
#world.drawPolyline(polyline)
return world
示例2: buildWorld
# 需要导入模块: import World [as 别名]
# 或者: from World import addLine [as 别名]
def buildWorld():
world = World(40, 20)
#polyline = [[5,4],[5,16]]
world.addLine(4, 15, 4, 5)
world.addLine(6, 15, 6, 5)
world.addLine(4, 10, 5, 10)
world.addLine(4, 9, 5, 9)
world.addLine(5, 9, 5, 10)
#world.addLine(1, 5, 10, 5)
return world
示例3: buildWorld
# 需要导入模块: import World [as 别名]
# 或者: from World import addLine [as 别名]
def buildWorld():
world = World(20, 10)
world.addLine(1, 5, 10, 5)
world.addLine(11, 5, 19, 5)
world.addLine(1, 7, 19, 7)
world.addLine(11, 5, 11, 3.5)
world.addLine(11, 2.5, 11, 1)
world.addBox(15,3)
polyline = [[1,6],[10.5,6],[10.5,3],[15,3]]
world.drawPolyline(polyline)
return world
示例4: buildWorld
# 需要导入模块: import World [as 别名]
# 或者: from World import addLine [as 别名]
def buildWorld():
world = World(10, 10)
# top 1
world.addLine(5, 3, 9, 3)
# bottom 1
world.addLine(5, 7, 9, 7)
# side left bootom
world.addLine(5, 3, 5, 3.5)
# side left middle
world.addLine(5, 3.75, 5, 5) # (narrow door, robot does not)
# world.addLine(5, 4, 5, 4.5) # (narrow door, robot still fits)
# side left top (wide door)
world.addLine(5, 6.5, 5, 7)
# side right top
world.addLine(9, 3, 9, 7)
world.addBox(target_x, target_y)
#polyline = [[1,6],[10.5,6],[10.5,3]]
#world.drawPolyline(polyline)
return world
示例5: buildWorld
# 需要导入模块: import World [as 别名]
# 或者: from World import addLine [as 别名]
def buildWorld():
world = World(20, 20)
# top 1 left
world.addLine(10, 7, 11, 7)
# top 2 right
world.addLine(13, 7, 14, 7)
# bottom 1 left
world.addLine(10, 3, 11, 3)
# bottom 2 right
world.addLine(13, 3, 14, 3)
# side left top
world.addLine(10, 3, 10, 4)
# side left bottom
world.addLine(10, 7, 10, 6)
# side right top
world.addLine(14, 3, 14, 4)
# side right bottom
world.addLine(14, 7, 14, 6)
#polyline = [[1,6],[10.5,6],[10.5,3]]
#world.drawPolyline(polyline)
return world
示例6: buildWorld
# 需要导入模块: import World [as 别名]
# 或者: from World import addLine [as 别名]
def buildWorld():
world = World(40, 20)
world.addLine(10, 4, 11, 4)
world.addLine(11, 4, 11, 6)
world.addLine(11, 6, 10, 6)
world.addLine(10, 6, 10, 4)
world.addLine(13,10,15,10)
world.addLine(16,10,18,10)
world.addLine(13,12,14,12)
world.addLine(15,12,18,12)
#polyline = [[5,5],[15,5],[15,15],[5,15],[5,5]]
world.addLine(4, 15, 4, 5)
world.addLine(6, 15, 6, 5)
world.addLine(4, 10, 5, 10)
world.addLine(4, 9, 5, 9)
world.addLine(5, 9, 5, 10)
#world.addLine(1, 5, 10, 5)
return world