Title / Description
Code #define BODY_FROM 100 #include "chain.c" #include "objects.c" #include "levels.c" clock_t now; int level = 0; // počáteční level, u prvního se hned zvýší int score; int gameover; // 0 = PLAY, 1 = DEAD, 2 = WIN, 3 = EXIT int rem_objects; // remaining objects /* Vytiskne hrací pole. w,h = skuteèná šíøka a výška pole all = 0/1 = pøetisknout vše nebo jen pohyblivé vìci? */ void print_area(int a[][MAX_W], int w, int h, int all) { int x, y; time_t t; int i, o; int link; gotoxy(1, 1); for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { if (a[y][x] == WALL) { if (all) printf("\xDB"); } else if (a[y][x] == HEAD) { if (!all) gotoxy(x+1, y+1); setColor(LIGHTRED); printf("\x01"); setColor(GREY); } else if (a[y][x] >= BODY_FROM) { if (!all) gotoxy(x+1, y+1); link = a[y][x] - BODY_FROM; setColor((link % 2 == 0) ? CHAIN_COLOR1 : CHAIN_COLOR2); printf("%s", chain[link].s); setColor(GREY); } else if (a[y][x]
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code