Skip to content

Commit cea0f8e

Browse files
committed
Add comments
1 parent 1e3a6d7 commit cea0f8e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

kadai3-1/lfcd85/typinggame/typinggame.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,16 @@ import (
1010
"time"
1111
)
1212

13+
// Words stores a slice of words which is used for the game.
1314
type Words []string
1415

16+
// Game struct holds the words and the time limits of the game.
1517
type Game struct {
1618
Words Words
1719
TimeLimit time.Duration
1820
}
1921

22+
// Execute starts the game using standard input and output.
2023
func Execute(g Game) error {
2124
g.run(inputChannel(os.Stdin), os.Stdout)
2225
return nil

kadai3-1/lfcd85/words/words.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"github.com/hashicorp/go-multierror"
99
)
1010

11+
// Import reads the text file and returns the words for the typing game.
1112
func Import(path string) (typinggame.Words, error) {
1213
var words typinggame.Words
1314
var result error

0 commit comments

Comments
 (0)