Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature: sudden death #111

Merged

Commits on Feb 2, 2024

  1. 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.
    PappasBrent authored and max-niederman committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    6129270 View commit details
    Browse the repository at this point in the history
  2. 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
    PappasBrent authored and max-niederman committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    dfc6db0 View commit details
    Browse the repository at this point in the history
  3. Make condition shorter and more precise

    Co-authored-by: Max Niederman <maxniederman@gmail.com>
    PappasBrent and max-niederman committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    0818d34 View commit details
    Browse the repository at this point in the history
  4. 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.
    PappasBrent authored and max-niederman committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    cb4fb14 View commit details
    Browse the repository at this point in the history