Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加随机值 #641

Merged
merged 5 commits into from
Jan 2, 2018
Merged

添加随机值 #641

merged 5 commits into from
Jan 2, 2018

Conversation

binderclip
Copy link
Collaborator

本次 PR 主要做的事情:

  • 加入随机值,包括点击的位置和延时时间
  • 另外加入过一段时间多休息一会儿的

修改后最高分数:x

@binderclip binderclip changed the base branch from master to dev January 2, 2018 07:38
if i == next_rest:
print('已经连续打了 {} 下,休息 {}s'.format(i, next_rest_time))
for j in xrange(next_rest_time):
print(next_rest_time - j)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

print ('程序将在{}s后启动'.format(next_rest_time-j))

if i == next_rest:
print('已经连续打了 {} 下,休息 {}s'.format(i, next_rest_time))
for j in xrange(next_rest_time):
print('程序将在 {}s 后继续'.format(next_rest_time - j))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以改成刷新当前行的方式输出,比较麻烦的话可以之后再优化

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

print('程序将在 {}s 后继续'.format(next_rest_time - j), end='\r')
好像这样就可以了

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好弄,改了

@binderclip
Copy link
Collaborator Author

#600

@binderclip binderclip merged commit 769b03e into wangshub:dev Jan 2, 2018
binderclip pushed a commit that referenced this pull request Jan 2, 2018
@pibicha
Copy link

pibicha commented Jan 2, 2018

xrange 换成 range吧?

@binderclip binderclip deleted the add-random branch January 3, 2018 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants