本文整理汇总了Python中Level.Level.createdoors方法的典型用法代码示例。如果您正苦于以下问题:Python Level.createdoors方法的具体用法?Python Level.createdoors怎么用?Python Level.createdoors使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Level.Level
的用法示例。
在下文中一共展示了Level.createdoors方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: printboard
# 需要导入模块: from Level import Level [as 别名]
# 或者: from Level.Level import createdoors [as 别名]
def printboard():
#set the playercharacter to the board for drawing
board[player.y][player.x] = playercharacter
for line in range(player.y - 12, player.y + 11):
for column in range(player.x - 40, player.x + 40):
print(board[line][column], end="")
print("")
#after rendering, remove the character from the board
board[player.y][player.x] = ' '
worm = Worm(0, 0, board, player)
worm.floodfill()
level1.createdoors()
level1.clearrandchars()
print(' \n' * 80)
print("Welcome to the Lazy Stronghold, press any key to play")
print("Controls are as follows: WASD for directions, q to quit and h for help")
print(level1.wallchar +
" signs are walls, you are the "
+ player.character +
" and " +
level1.outofboundschar +
" is out of bounds"
)
print(time.clock() - inittime)
print(' \n ' * 10)