Skip to content

Commit

Permalink
fix: inital challenge
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenLoc committed May 4, 2023
1 parent fe72c11 commit 9a78512
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/typewriter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ enum State {
Typing,
Won,
Reset,
Initial,
None,
}

Expand Down Expand Up @@ -72,6 +73,10 @@ impl TypeState {
self.input.clear();
self.state = State::None
}
State::Initial => {
self.challenge = settings.provide_next_string().to_challenge();
self.state = State::None
}
State::None => {
if !self.input.is_empty() {
self.state = State::Started
Expand Down

0 comments on commit 9a78512

Please sign in to comment.