#include #include /* Plot a solid color block at screen x, y */ int WIDTH = 80; int HEIGHT= 24; int GREY = (15 + 6*6*6); void putbcyx (int cl, int ch,int y, int x) { printf("\e[%d;%dH\e[48;5;%dm%c", y+1, x+1, cl, ch); } void putfcyx (int cl, int ch,int y, int x) { printf("\e[%d;%dH\e[0;38;5;%dm%c", y+1, x+1, cl, ch); } int colorCounter=0; int dir=1; int x, y; int c=5,d=5,e=5; int sp=1; int newSpread (int i) { return random()%(i*2+1) - i; } void building (void) { int w = random()%10; int h = random()%20+2; int x = random()%WIDTH; int m, n; int c, cc=random()%3+1; for (m=w; 0