-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add sudden_death_enabled field to TestEvent - Add the field sudden_death_enabled to the TestEvent struct to represent whether suddean death mode is turned on. - Extract the is_missed_word_event() lambda in the calc_missed_words() test into a function for use in other parts of the program. * Add sudden death option and logic - Add command line option --sudden-death to enabel sudden death mode - Add logic for restarting the test as soon as an error is made if sudden death mode is enabled * Make condition shorter and more precise Co-authored-by: Max Niederman <maxniederman@gmail.com> * refactor(test): move sudden death logic to Test - Move logic for checking if a user makes a mistake during sudden death mode out of `src/main.rs` and into `src/test/mod.rs`. Note that this changes how sudden death mode works: previously, if a user made a mistake in sudden death mode, they would immediately begin a new test; now, they restart the current test. --------- Co-authored-by: Max Niederman <maxniederman@gmail.com>
- Loading branch information
1 parent
2a68484
commit d6128df
Showing
3 changed files
with
53 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters