-
Notifications
You must be signed in to change notification settings - Fork 2
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-simady #26
base: master
Are you sure you want to change the base?
Kadai3-1-simady #26
Conversation
} | ||
|
||
// New GameMasterを生成する. | ||
func New(reader io.Reader, writer io.Writer, timeLimit time.Duration, problems []string) GameMaster { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
引数はもっと短くてよいのでは?
|
||
func (gm *gameMaster) input() <-chan string { | ||
ch := make(chan string) | ||
go func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
プログラム終了時にはこのゴールーチンが閉じられるがそれ以外では閉じられないので注意。
) | ||
|
||
var ( | ||
allCorrectReader *os.File |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
なぜゆえパッケージ変数?
timeUpReader *os.File | ||
) | ||
|
||
func setup(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
パッケージ変数に入れずに3つ返せば良さそう。
setup
じゃ何をセットアップするのか分かりづらい。
課題内容
タイピングゲームを作ろう
実行例
その他