Bell 32V development
[unix-history] / usr / src / cmd / learn / whatnow.c
CommitLineData
bbddffb1
TL
1#include "stdio.h"
2#include "lrnref"
3
4whatnow()
5{
6 if (todo == 0) {
7 more=0;
8 return;
9 }
10 if (didok) {
11 strcpy(level,todo);
12 if (speed<=9) speed++;
13 }
14 else {
15 speed -= 4;
16 /* the 4 above means that 4 right, one wrong leave
17 you with the same speed. */
18 if (speed <0) speed=0;
19 }
20 if (wrong) {
21 speed -= 2;
22 if (speed <0 ) speed = 0;
23 }
24 if (didok && more) {
25 printf("\nGood. Lesson %s (%d)\n\n",level, speed);
26 fflush(stdout);
27 }
28}