projects
/
unix-history
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
Research V7 development
[unix-history]
/
usr
/
src
/
cmd
/
learn
/
whatnow.c
#include
"stdio.h"
#include
"lrnref"
whatnow
()
{
if
(
todo
==
0
) {
more
=
0
;
return
;
}
if
(
didok
) {
strcpy
(
level
,
todo
);
if
(
speed
<=
9
)
speed
++;
}
else
{
speed
-=
4
;
/* the 4 above means that 4 right, one wrong leave
you with the same speed. */
if
(
speed
<
0
)
speed
=
0
;
}
if
(
wrong
) {
speed
-=
2
;
if
(
speed
<
0
)
speed
=
0
;
}
if
(
didok
&&
more
) {
printf
(
"
\n
Good. Lesson %s (%d)
\n\n
"
,
level
,
speed
);
fflush
(
stdout
);
}
}