Skip to content

Latest commit

 

History

History
118 lines (92 loc) · 3.91 KB

README.md

File metadata and controls

118 lines (92 loc) · 3.91 KB

typit   License: MIT


INTRODUCTION

A simple typing accuracy & speed tester game/tool made using basic C++ with a bit of file handling.


DESCRIPTION


BUILD & EXECUTE

  • For Windows users: firstly install make for executing makefile, from this link;
  • For Linux users: make generally comes pre-installed;
    • if not, then run the following command: sudo apt-get install make

  • 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 DESIGN

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;

typit_class_diagram



GAME SPAN


INPUTS

  1. Number of participants
  2. their names
  3. Number of rounds
  4. Desired difficulty level (1:Easy | 2:Medium | 3:Hard)
  5. And then, in each round every participant has to enter the given sentence

OUTPUTS

  1. 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.
  2. After each round the Leaderboard is shown with the total scores of all participants.

SCORING RULES

  1. 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;
  2. Tie breakers:
    • Average Accuracy
    • Average Speed
    • Maximum Score among all the rounds
    • Luck ;)


TECH STACK

  • C++

Happy Typing! 😄