#include #include #include #include #include #include #include static int get_colour(void); static void explode(int row, int col); static void showit(void); int main(int argc, char *argv[]) { int start,end,row,diff,flag = 0,direction; unsigned seed; initscr(); if (has_colors()) start_color(); seed = time((time_t *)0); srand(seed); cbreak(); for (;;) { do { start = rand() % (COLS -3); end = rand() % (COLS - 3); start = (start < 2) ? 2 : start; end = (end < 2) ? 2 : end; direction = (start > end) ? -1 : 1; diff = abs(start-end); } while (diff<2 || diff>=LINES-2); attrset(A_NORMAL); for (row=0;row 8) attr |= A_BOLD; return(attr); } static void showit(void) { refresh(); napms(120); }