#include #include #include #include #include #include #include #include #define MAXx 200 #define MAXy 50 char gfx1[]="|"; char gfx2[]="|||"; char gfx3[]="[ ||| ]"; struct stat statb; FILE *fpw; main() { int i,j,y; long x; int lamps[20][4]; FILE *fp; void usleep(); char word[80]; char screen[MAXy][MAXx]; char oneline[MAXx]; initscr(); /*Always the first function called */ cbreak(); /*Do not store chars into tty driver buffer*/ echo(); /*do not echo chars read with getch*/ nodelay(stdscr,TRUE); intrflush(stdscr, FALSE); /*Flush buffers on onint */ keypad(stdscr, TRUE); /*Enable key pad (arrow keys)*/ clear(); if ((fp=fopen("typegame.dat","r"))==0) { perror("typegame.dat");exit(-1); } if ((fpw=fopen("lala","w"))==0) { perror("lala");exit(-1); } fstat(fileno(fp),&statb); for (y=0;y0;y--) { for (x=0;x