Compare commits

..

No commits in common. "main" and "v0.2.0" have entirely different histories.
main ... v0.2.0

2 changed files with 1 additions and 9 deletions

View File

@ -24,7 +24,7 @@ func finish(start time.Time, stat *db.Stat, finished bool) {
stat.Words = globalStat.Words
stat.Finished = finished
stat.CPM = float64(globalStat.Correct) / past.Minutes()
stat.WPM = float64(globalStat.Words) / past.Minutes()
stat.WPM = float64(globalStat.Words+1) / past.Minutes()
stat.TimeTaken = past.Milliseconds()
fmt.Printf("\r\n%s", colorizer.Colors.Reset())
fmt.Print(past)
@ -176,6 +176,5 @@ outer:
log.Printf("ERROR: dbc.Create: %v", err)
}
}
globalStat.Reset()
}
}

View File

@ -8,10 +8,3 @@ type Stat struct {
}
var globalStat Stat
func (s *Stat) Reset() {
s.Skipped = 0
s.Correct = 0
s.False = 0
s.Words = 0
}