We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4038378 commit 97c1e79Copy full SHA for 97c1e79
kadai3-1/lfcd85/cmd/main.go
@@ -1,6 +1,7 @@
1
package main
2
3
import (
4
+ "flag"
5
"fmt"
6
"time"
7
@@ -10,14 +11,17 @@ import (
10
11
12
func main() {
13
path := "./testdata/go_standard_library.txt" // FIXME: move to options
14
+ timeLimit := flag.Int("t", 30, "Time limit of the game (secs)")
15
+ flag.Parse()
16
+
17
words, err := words.Import(path)
18
if err != nil {
19
fmt.Println("error:", err)
20
return
21
}
22
g := typinggame.Game{
23
Words: words,
- TimeLimit: 30 * time.Second,
24
+ TimeLimit: time.Duration(*timeLimit) * time.Second,
25
26
27
if err := typinggame.Execute(g); err != nil {
0 commit comments