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

kadai 3-1 shinta #34

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

kadai 3-1 shinta #34

wants to merge 3 commits into from

Conversation

ShintaNakama
Copy link

@ShintaNakama ShintaNakama commented Sep 22, 2019

課題3

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

  • 標準出力に英単語を出す(出すものは自由)

  • 標準入力から1行受け取る

  • 制限時間内に何問解けたか表示する

  • mainと、typing.goの、どちらでFprintf()を使うべきか迷った

@ShintaNakama ShintaNakama changed the title 動く形まで kadai 3-1 shinta Sep 22, 2019

func execute(chInput <-chan string, chFinish <-chan time.Time, stdout io.Writer, t Typing) {

score := 0
Copy link
Member

Choose a reason for hiding this comment

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

ゼロ値

func inputRoutine(r io.Reader) <-chan string {
ch := make(chan string)

go func() {
Copy link
Member

Choose a reason for hiding this comment

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

タイムアウトした場合のこのゴールーチンの終了は?


go func() {
s := bufio.NewScanner(r)
for s.Scan() {
Copy link
Member

Choose a reason for hiding this comment

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

エラー処理

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants