我想让播放器只有500-600毫秒的帧来输入1或2。我不知道该怎么做,而且我找到的唯一计时器
time.sleep(1)
这是我的密码:
game = 1
while game == 1:
play = input(print("'display picture in other window' [1] for right [2] for wrong "))
if '1' in play:
print("You shot the Criminal! + 1 point")
point = point + 1
row = row + 1
if row == 3:
unlock2 = 1
print ("You gained 2 bonus points!")
point = point + 2
row = 0
if unlock2 == 1:
point = point + (point/2)
print ("You gained bonus points!")
elif '2' in play:
print("You shot an innocent! Game Over!")
break
game = 0
编辑:编辑
最简单的方法是测量用户的响应时间,如下所示:
用法:
相关问题 更多 >
编程相关推荐