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 (
1010 "time"
1111)
1212
13+ // Words stores a slice of words which is used for the game.
1314type Words []string
1415
16+ // Game struct holds the words and the time limits of the game.
1517type Game struct {
1618 Words Words
1719 TimeLimit time.Duration
1820}
1921
22+ // Execute starts the game using standard input and output.
2023func Execute (g Game ) error {
2124 g .run (inputChannel (os .Stdin ), os .Stdout )
2225 return nil
Original file line number Diff line number Diff line change 88 "github.com/hashicorp/go-multierror"
99)
1010
11+ // Import reads the text file and returns the words for the typing game.
1112func Import (path string ) (typinggame.Words , error ) {
1213 var words typinggame.Words
1314 var result error
You can’t perform that action at this time.
0 commit comments