update dict
[QFreeRecite.git] / src / core / Reciter.cpp
blobe9909c9e2d23d36a4d30ec1eb45828cd28d5c26a
1 #include <vector>
2 #include <fstream>
3 #include <algorithm>
4 #include <ctime>
5 #include <set>
6 #include "ConfigHolder.h"
7 #include "Reciter.h"
8 #include "WordList.h"
9 #include "Debug.h"
11 namespace freeRecite {
13 Reciter::~Reciter() {
14 D_OUTPUT("~Reciter()\n");
17 bool Reciter::load(time_t initID) {
18 if( loadWords(initID,false) ) {
19 wordList = new WordList(words.size(),configHolder.r_list());
20 return true;
21 }else {
22 return false;
26 void Reciter::test(bool result) {
27 if(result) {
28 if(wordList->status() == 0)
29 ++score;
30 wordList->pass();
31 } else {
32 wordList->lose();
36 } //namespace freeRecite end