Documentation
¶
Index ¶
Constants ¶
View Source
const InitialLife = 10 * time.Second
View Source
const (
WPMWindow = 20
)
wordsPerChar is used for computing WPM. Word is considered to be in average 5 characters long.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Text []rune
Timeline []float64
InputPosition int
ErrorInput []rune
StartedAt time.Time
Offset int
Zen bool
Mute bool
// Minimal permitted speed
MinSpeed int
LastLifeReductionTime time.Time
// For how long you could have your speed under speed limit and still continue typing
RemainingLife time.Duration
// contains filtered or unexported fields
}
App holds whole app state
func (*App) LinesTyped ¶
LinesTyped computes the number of typed lines
func (*App) ToDisplay ¶
func (a *App) ToDisplay() view.DisplayableData
Click to show internal directories.
Click to hide internal directories.