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();
time=0;
while(time<3) {
if((b=getch())=='S' && n==1) {
a[time][1]='*';
time++;
n=0;
showboard();
sleep(400);
} else if((b=getch())=='S' && n==0) {
a[time][1]='*';
time++;
showboard();
sleep(400);
} else { printf("hi"); }
}
}
int showboard()
{
int r=0;
system("clear");
while(r<3) {
printf("%c %c %c %c \n", a[0][r], a[1][r], a[2][r], a[3][r]);
}
return 0;
}