Kana Trainer
The original project was a Japanese Quiz Game App I made for iOS called Kana Trainer. It makes learning the Japanese writing system a breeze. I decided to make this mobile web friendly clone.
Installtion instructions
git clone git@github.com:Mycroft1891/kana-trainer.git
cd kana-trainer
yarn install
yarn start
For firebase deployment: firebase deploy
Documentation
The whole app is single component (Home) react app. The quiz data is stored in a seperate file called Sign.js
insdide the data
folder.
The Home component has a number of methods to handle the game logic:
incrementScore()
: increment score when answered correctlyremoveLife()
: removes a life when answered wronglypickNewQuestion()
: get a new random questionresetStats()
: resets score and lifes when lifes are at 0check(answer)
: checks the user chossen answerchangeMode(hiragana)
: changes game mode to hiragana/katakana
The Sign class handles the data and returns the required random questions and answers:
getQuestion(userChoice)
: get random questions based on game modeshuffleArray()
: shuffles the data arraygetRandomNumber(maxValue)
: gets a random number smaller than maxValue