A simple typing accuracy & speed tester game/tool made using basic C++ with a bit of file handling.
- For Windows users: firstly install
make
for executingmakefile
, from this link; - For Linux users:
make
generally comes pre-installed;- if not, then run the following command:
sudo apt-get install make
- if not, then run the following command:
- Now, run the following commands:
- for building executable file:
make all
- for executing it:
make run # universal;
- for deleting executable file:
make clean # for linux/macOS; make clean(win) # for windows;
CLASS | DESCRIPTION |
---|---|
participant | stores all the participant related data as it's private member variables: participant's name, total score, max score over all the rounds, average accuracy, average speed; has appropriate public member functions to access/alter/print the data |
sentence | stores just one sentence as it's private member variable; it's constructor fetches a sentence of the given difficulty level from the assets and stores it; also has public member function to add a sentence to the assets; |
- Number of participants
- their names
- Number of rounds
- Desired difficulty level (1:Easy | 2:Medium | 3:Hard)
- And then, in each round every participant has to enter the given sentence
- After each turn of every participant, the tool shows the time taken by him to type, his accuracy & score for that turn & the total score as well.
- After each round the Leaderboard is shown with the total scores of all participants.
- For each turn the score of the participant is equal to A/B (i.e. A divided by B) ;
where:- A equals, in the participant's input sentence, the number of characters that are 'in place' as compared to the given statement and if that number happens to be less than 50% of total size of the given sentence them A = 0;
- B equals the time taken by the participant to type in seconds;
- Tie breakers:
- Average Accuracy
- Average Speed
- Maximum Score among all the rounds
- Luck ;)
- C++