Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChooseText ¶
ChooseText randomly chooses a text from the dataset
Types ¶
type State ¶
type State struct { // CurrWord is an index to State.Words CurrWord int // Words contains the text split by spaces Words []string // StartTime is a timestamp of the first keystroke StartTime time.Time // contains filtered or unexported fields }
State describes the state of a game
func (*State) NextWord ¶
func (s *State) NextWord()
NextWord saves stats of the current word and increments the counter
Click to show internal directories.
Click to hide internal directories.