本文整理汇总了Python中Client.KEY方法的典型用法代码示例。如果您正苦于以下问题:Python Client.KEY方法的具体用法?Python Client.KEY怎么用?Python Client.KEY使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Client
的用法示例。
在下文中一共展示了Client.KEY方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Client
# 需要导入模块: import Client [as 别名]
# 或者: from Client import KEY [as 别名]
snowballs = 0
snowball_target = 0
min_snowballs = 3
max_snowballs = 10
min_player_distance = 3.5
max_throw_snowball_distance = 7
# Create our client
c = Client()
# Insert your key here
c.KEY = "g2lVRjJN96svcwTYPG8K0MmUfdQq6Xg1"
# Tell the client to use this function to decide the next move.
# This function is defined above.
c.decide_move = dummy
# Connect to the game server
if c.connect():
# If we successfully connected, start playing
print 'Connected'
# Tell the client to start listening for maps
c.start()
# Wait until the user presses a key