本文整理汇总了Python中com.aurellem.gb.Gb.step方法的典型用法代码示例。如果您正苦于以下问题:Python Gb.step方法的具体用法?Python Gb.step怎么用?Python Gb.step使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.aurellem.gb.Gb
的用法示例。
在下文中一共展示了Gb.step方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: press
# 需要导入模块: from com.aurellem.gb import Gb [as 别名]
# 或者: from com.aurellem.gb.Gb import step [as 别名]
def press(buttons, steplimit=1):
"""
Press a button. Use steplimit to say for how many steps you want to press
the button (try leaving it at the default, 1).
"""
if hasattr(buttons, "__len__"):
number = button_combiner(buttons)
elif isinstance(buttons, int):
number = buttons
else:
number = buttons
for step_counter in range(0, steplimit):
Gb.step(number)
示例2: nstep
# 需要导入模块: from com.aurellem.gb import Gb [as 别名]
# 或者: from com.aurellem.gb.Gb import step [as 别名]
def nstep(steplimit):
"""
Step the game forward by a certain number of instructions.
"""
for counter in range(0, steplimit):
Gb.step()
示例3: step
# 需要导入模块: from com.aurellem.gb import Gb [as 别名]
# 或者: from com.aurellem.gb.Gb import step [as 别名]
def step():
"""
Advances the emulator forward by one step.
"""
Gb.step()