Skip to content

Conversation

@showchan
Copy link

課題3-1

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

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

ヒント

  • 制限時間にはtime.After関数を用いる
    • context.WithTimeoutでもよい
  • select構文を用いる
    • 制限時間と入力を同時に待つ

Usage

$ typing [-t=sec(default:10)] [-f=file(default:test.txt)]

気になっているところ

  • 正解判断を fmt.Println で表示させたいがうまくできなかった
  • timeup 前(for range完了)した場合の処理をどうするか考えきれていない

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