2 #include "ForgetCurve.h"
3 #include "ConfigHolder.h"
15 operator>>(std::istream
&istrm
, Task
&tsk
) {
20 istrm
>> tsk
.reviewTime
;
32 operator<<(std::ostream
&ostrm
, const Task
&tsk
) {
33 ostrm
<< tsk
.id
<< ','
34 << tsk
.reviewTime
<< ','
40 bool operator>(const Task
&src
, const Task
&tar
) {
41 return src
.reviewTime
> tar
.reviewTime
;
44 bool operator<(const Task
&src
, const Task
&tar
) {
45 return src
.reviewTime
< tar
.reviewTime
;
48 bool operator==(const Task
&src
, const Task
&tar
) {
49 return src
.id
== tar
.id
;
52 bool Task::shouldReview() const {
55 return reviewTime
<= current
;
58 int Task::test(int mark
) {
61 if( forgetCurve
.pass(step
,mark
) ) { //If have passed
63 if(step
== 8) {//This task has finished
67 reviewTime
= forgetCurve
.getReviewTime(step
);
69 }else { //If haven't passed
70 reviewTime
= forgetCurve
.getReviewTime(step
);
75 }//namespace freeRecite end