rendered paste body#include <ncurses.h>
#include <stdio.h>
char a[3][3];
int showboard ();
int
main ()
{
int time, n = 1;
char b;
initscr ();
cbreak ();
noecho ();
b = getch ();
for (time = 0; time < 3; time++)
{
if (n == 1)
{
a[time][1] = '*';
n = 0;
showboard ();
sleep (400);
}
else if (n == 0)
{
b = getch ();
a[time][1] = '*';
showboard ();
sleep (400);
}
}
}
int
showboard ()
{
int r;
system ("clear");
for (r = 0; r < 3; r++)
{
printf ("%c %c %c %c \n", a[0][r], a[1][r], a[2][r], a[3][r]);
}
}