#include #include #include #include #include #define YSIZE 50 #define YMUL (200/YSIZE) #define XSIZE 80 #define XMUL (320/XSIZE) #define r() (lrand48()) typedef int board_t[3][XSIZE][YSIZE]; board_t board[2]; int frame=0; void init(void) { int r,g,b,x,y; vga_setmode(G320x200x16M); r=g=b=0; for(x=0;x<256;x++) { if (x<64) r=x; else if (x<128) g=(x-64); else if (x<192) b=(x-128); else r=g=b=255-x; vga_setpalette(x,r,g,b); } for(r=0;r<3;r++) for(x=0;x