death mode - #18
Conversation
|
this looks awesome! I made a few minor tweaks in a branch of mine that I'll add here! One thing I'd love you opinion on: What do you think about not showing stats if the user fails in death mode? We could just throw a skull icon in the center of the terminal if they fail maybe. I kinda like the idea of making the seeing stats a rewarding experience if you're in death mode. |
|
@jrnxf Your idea sounds great! I've also reviewed changes at your branch, and all of them make sense to me. I'll add it to the PR along with your proposition 👌 |
|
I've just realized that it will be better to show the word and the exact place where you made a typo, along with skull at the bottom line after loosing in the death mode. Will try to implement it |
Three new ways to practice, all Monkeytype-inspired: - `-d` / `--death-mode`: end the test the instant you mistype a character. Checked ahead of every other finish rule, so it beats even a running timer. (Revives the long-open death-mode PR jrnxf#18.) - `--punctuation`: sprinkle capitalization and punctuation into generated words so passages read like real sentences. - `--numbers`: intersperse random number tokens. Punctuation/numbers live in a new `decorate` module (`WordMods`) applied to the initial prompt and, in continuous mode, to each refilled chunk — so a timed test keeps its style as words stream in. All three apply only to generated word mode; a custom prompt (`-p`) or sentences (`-f`) are left untouched. Docs and `--help` updated; tests cover death-mode finish timing and the decorator's capitalization, closing punctuation, number insertion, and no-op-when-disabled behavior. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Came across this while adding a death mode of my own — opened #28 with a tested implementation ( |
Adds a `-d` / `--death-mode` flag. With it on, the test finishes the instant an incorrect character is typed, checked ahead of the usual length/timer rules so it beats even a running timer. Practicing with zero tolerance for errors is a well-known way to build accuracy (and, in turn, speed). This revives the idea from the long-open PR jrnxf#18 with a focused implementation and tests. - thok: `death_mode` flag on `Thok`; `has_finished` returns early on any incorrect input when it's set. - main: `-d` flag wired through `App::new`/`reset`. - docs: README example + `--help` entry. - tests: mistake ends it, off tolerates mistakes, and it overrides a running timer.
What:
Added death mode, which can be enabled via
-dflag. When the death mode is enabled, the round will be finished as soon as the user will type an incorrect symbolWhy:
If you want to become a good typist, you need to learn to type with no mistakes. This mode will enforce you to think twice on each key press and strongly decrease amount of typing mistakes. This will lead to better typing speed
How:
There is a
has_finishedfunction at game related file, which validates if the round is completed. At this PR I've additionally added a check to the function to validate it there are any mistakes in the input fieldChecklist:
Allow edits from maintainersoption checked[your_username]/(ex.thatvegandev/featureX)