Skip to content

Latest commit

 

History

History
80 lines (72 loc) · 4.28 KB

NOTES.md

File metadata and controls

80 lines (72 loc) · 4.28 KB

Basic features

  • A Race

    • Given random paragraph, type it as fast as possible
    • Improved typing skills can be infered from WPM, Accuracy metrics of each race
  • Functions:

    • On app startup it shows the race history
    • Start new race
      • Ctrl+s starts new race if ui is in history mode(when stats view is active)
      • Start a countdown in word view before race begins(TODO nice to have)
      • When race begins, view is focused to word view to allow typing words
      • There is a default maximum time a race can be in progress (2:30), after this time race automatically expires/ends(TODO nice to have)
    • End race
      • Ctrl+e ends a current race and switches ui to history mode
      • Race auto ends when all words are finished, and ui moves to history mode
      • Only if race was finished by typing all the words, will the stats for the race get added to history list
    • Stats mode
      • When no race is in progress, the stats view will show history from past races
      • Hisotry is ordered in recent first order
      • We can scroll through historical stats
      • We keep track of Words per minute and Accuracy for a race
    • Controls view
      • Displays help text for ui controls
      • We can collapse or expand this view(TODO nice to have)
    • Exit game
      • Ctrl+c exits from racer ui to the command line
      • Asks for confirmation Y/N before exiting(TODO nice to have)
+-------------------------------------------------------------------------+
|+--------------------------------------------------++-------------------+|
||                                                  ||                   ||
||                                                  ||                   ||
||                                                  ||  Stats View       ||
||     Paragraph View                               ||                   ||
||                                                  ||                   ||
||                                                  ||                   ||
||                                                  ||                   ||
||                                                  |+-------------------+|
||                                                  |+-------------------+|
|+--------------------------------------------------+|                   ||
|+--------------------------------------------------+|  Controls View    ||
||     Word View                                    ||                   ||
|+--------------------------------------------------++-------------------+|
+-------------------------------------------------------------------------+         
  • UI

    • UI will always have 4 Views/Panes- paragraph, word, stats and controls
    • Paragraph View
      • Shows a paragraph to type if race is in progress
      • Highlights next word to type during a race
        • White bg to indicate next word to type
        • Red bg for the word indicates mistyping in word view
      • Grey out this view if no race is in progress(TODO nice to have)
    • Word View
      • This is a input box to type next target word in the given paragraph
      • Greyed out if no race is in progress(TODO nice to have)
      • Red bg for typed word indicates mistyped, otherwise default bg is applied
      • Show countdown before a race begins (1..2..3.. GO!) (TODO nice to have)
    • Stats View
      • This view shows the historical race stats in default mode(on app startup)
      • Shows stats in recent first order. And we will be able to scroll through historical stats
      • Highlights a stat row to show we can scroll
      • In race mode, this view shows auto updating stat(WPM, Accuracy) for race in progress. In addition also shows a timer that counts down from 2:30 (TODO nice to have. timer could count upward until 2:30 mins)
    • Controls View
      • Used to show help text that displays the ui controls
      • Ctrl+x can expand/collapse this view
  • Data directory

    • All data related to termracer is put under $HOME/termracer
    • This directory contains
      • samples.json
      • debug log file
      • race history csv file

Credits for the above ASCII art to https://github.com/astashov/tixi