本文整理汇总了Python中bot.Bot.next方法的典型用法代码示例。如果您正苦于以下问题:Python Bot.next方法的具体用法?Python Bot.next怎么用?Python Bot.next使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bot.Bot
的用法示例。
在下文中一共展示了Bot.next方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from bot import Bot [as 别名]
# 或者: from bot.Bot import next [as 别名]
def main():
# run this from the home
# https://www.facebook.com/appcenter/diamonddash?
# fb_source=appcenter_getting_started&fbsid=114
# with firefox at default zoom (cmd+0 -> default zoom)
play_button = match('imgs/play.png')
if play_button:
#bottom_right = [play_button[0] - 61, play_button[1] + 102]
#top_left = [play_button[0] - 463, play_button[1] - 258]
mouseclick(play_button[0], play_button[1])
mouseclick(play_button[0], play_button[1])
time.sleep(3)
play_button = match('imgs/play2.png')
if play_button:
mouseclick(play_button[0], play_button[1])
bottom_right = [486, 686]
top_left = [86, 326]
# the game has started
time.sleep(4)
print 'start'
# get top left point and bottom right
diamond_width = (bottom_right[0] - top_left[0]) / (GRID_WIDTH)
diamond_height = (bottom_right[1] - top_left[1]) / (GRID_HEIGHT)
b = Bot(
#[top_left[0] - diamond_width / 2, top_left[1] - diamond_height / 2],
[top_left[0], top_left[1]],
GRID_WIDTH, GRID_HEIGHT, diamond_width, diamond_height,
SENSITIVITY, COUNTER_THRESHOLD)
while b.running:
b.next()