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

Kadai3 1 sminamot #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

sminamot
Copy link

タイピングゲームを作ろう

  • 標準出力に英単語を出す(出すものは自由)
  • 標準入力から1行受け取る
  • 制限時間内に何問解けたか表示する

Copy link

@mizkei mizkei left a comment

Choose a reason for hiding this comment

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

コメントしましたので、参考にしていただければと思います

return ch
}

func limit(d time.Duration) <-chan struct{} {
Copy link

Choose a reason for hiding this comment

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

time.After を直接利用するだけでも十分かと思いました

tCh := limit(10 * time.Second)
iCh := input(os.Stdin)
rand.Seed(time.Now().UnixNano())
aNum := 0
Copy link

Choose a reason for hiding this comment

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

zero valueがそのまま利用できるようであれば、 var aNum, qNum int などで宣言しても良いと思います

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.

2 participants