This is a humble typing game I made to help me get better at touch typing. But since it's public, here's a fittingly small description for this small program:
- A "target" will pop up on the terminal, you have to type it out as quickly and accurately as possible. While you're not timed by the game, your accuracy is tracked and you'll get a message
MISS!
in red letters whenever you miss a character in the target. - Missing doesn't advance the cursor, which means you'll stay on a letter until you get it right. There's also no going backwards to redo a line. The cursor only increases, and the only way to move the cursor is by typing the correct character.
- After you successfully type out a target, a new one will immediately replace it for the cycle to repeat over and over until you exit the game by pressing the
esc
character. Upon exiting, you'll see your accuracy percentage, as well as the raw number of hits and total characters attempted over the course of the session.
- clone the repo
- cd into it
- run
go run main.go
and optionally invoke your configuration of choice.- For example, a "hard mode" might look like:
go run main.go -mode=fullASCII -case=mixed -length=15 -variable=true
- If you only want to practice your numbers, below is a nice zen-like choice:
go run main.go -mode=num -length=1
- For example, a "hard mode" might look like:
- There are several command-line arguments you can give the file upon execution that will dictate its behavior:
mode
one of{'alpha', 'num', 'alphanum', 'fullASCII'}
, defaultalphanum
mode
determines the character bank that your targets will come from:alpha
: letters[a-z]
(the letter case is modified by another flag,case
)alphanum
: letters and numbers[a-z0-9]
num
: numbers only[0-9]
fullASCII
: letters, numbers, and symbols. For an exact list, it's ASCII characters 33-126
case
one of{'lower', 'upper', 'mixed'}
, defaultlower
case
modifies the letters inmode
, if alpha characters were chosenlower
: lowercase letters onlyupper
: uppercase letters onlymixed
: both lowercase and uppercase letters
length
(integer), default7
length
determines the max length of the target. It's modified byvariable
variable
(boolean), defaulttrue
variable
determines whether the target length can vary randomly between runs. Iftrue
, length can vary between[1, length]
else, the target's length will be constantlylength
characters for every run