From b03b61b232c1fa0b9ff1ae607232f8ab3f55ea38 Mon Sep 17 00:00:00 2001 From: b4rkod Date: Wed, 17 Jan 2024 21:17:07 +0300 Subject: AAAA --- test.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'test.c') diff --git a/test.c b/test.c index 606aaa6..d3a75e6 100644 --- a/test.c +++ b/test.c @@ -4,7 +4,7 @@ #include #include -#define ms 50000 +#define ms 20000 int main(void) { @@ -15,44 +15,45 @@ int main(void) exit(EXIT_FAILURE); } - start_color(); init_pair(1, COLOR_GREEN, COLOR_BLACK); init_pair(2, COLOR_CYAN, COLOR_BLACK); init_pair(3, COLOR_RED, COLOR_BLACK); init_pair(4, COLOR_YELLOW, COLOR_BLACK); + for (int f = 0; f <= 9; f++){ + attron(COLOR_PAIR(1)); - move(1, 10); - for (int i = 1; i <= 19; i++) { - move(1, (11 + i)); + for (int i = 1; i <= (19 - (f * 2)); i++) { + move(1 + f, ((11 + f) + i)); addch('X'); refresh(); usleep(ms); } attron(COLOR_PAIR(2)); - for (int i = 1; i <= 19; i++) { - move((1 + i),30); + for (int i = 1; i <= (19 - (f * 2) ); i++) { + move((f + i),(30 -f)); addch('X'); refresh(); usleep(ms); } attron(COLOR_PAIR(3)); - for (int i = 1; i <= 19; i++) { - move(20, (30 - i)); + for (int i = 1; i <= (20 - (f * 2)); i++) { + move((20 - f), (31 - (i+f))); addch('X'); refresh(); usleep(ms); } attron(COLOR_PAIR(4)); - for (int i = 1; i <= 19; i++) { - move((20 - i), 11); + for (int i = 1; i <= (19 - (f * 2)) ; i++) { + move((20 - (i + f)), (11 + f)); addch('X'); refresh(); usleep(ms); } + } refresh(); getch(); -- cgit v1.2.3