You could pretty much just replace
Code:
ch = mvgetch(l, c);
with something like
Code:
move(l, c);
if(kbhit()) {
ch = getch();
/* process ch -- the if(ch...) code */
}
/* update the screen, including the timer */
BTW, I wouldn't call a variable l (lowercase L). It looks too much like 1 (numerical one).
Also, the variable i seems to play the same role as the variable c, unless they start at different numbers.
As well, this
Code:
mvprintw(l, c, " ");
is the same as
Code:
mvaddch(l, c, ' ');
not that it matters too much. But it might be easier to read for this code, for instance:
Code:
mvprintw(l, c++, "%c", ch);
->
Code:
mvaddch(l, c++, ch);
See the man page: http://developer.apple.com/documenta...vaddch.3x.html
----
But work on the critical bugs first.