File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,16 @@ import (
10
10
"time"
11
11
)
12
12
13
+ // Words stores a slice of words which is used for the game.
13
14
type Words []string
14
15
16
+ // Game struct holds the words and the time limits of the game.
15
17
type Game struct {
16
18
Words Words
17
19
TimeLimit time.Duration
18
20
}
19
21
22
+ // Execute starts the game using standard input and output.
20
23
func Execute (g Game ) error {
21
24
g .run (inputChannel (os .Stdin ), os .Stdout )
22
25
return nil
Original file line number Diff line number Diff line change 8
8
"github.com/hashicorp/go-multierror"
9
9
)
10
10
11
+ // Import reads the text file and returns the words for the typing game.
11
12
func Import (path string ) (typinggame.Words , error ) {
12
13
var words typinggame.Words
13
14
var result error
You can’t perform that action at this time.
0 commit comments