diff options
author | b4rkod <void@Asena.localdomain> | 2024-01-17 21:17:07 +0300 |
---|---|---|
committer | b4rkod <void@Asena.localdomain> | 2024-01-17 21:17:07 +0300 |
commit | b03b61b232c1fa0b9ff1ae607232f8ab3f55ea38 (patch) | |
tree | 9169255eae57e59035595768e8dd46cfaba28f50 /odev_6.c | |
parent | 2fa043277b090a37b3f378a2fefccc57b5bd2814 (diff) |
Diffstat (limited to 'odev_6.c')
-rw-r--r-- | odev_6.c | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/odev_6.c b/odev_6.c new file mode 100644 index 0000000..6aaed91 --- /dev/null +++ b/odev_6.c @@ -0,0 +1,59 @@ + +#include <stdlib.h> +#include <stdio.h> +#include <curses.h> +#include <unistd.h> + +#define ms 50000 + +int main(void) +{ + WINDOW * mainwin; + + mainwin = initscr(); + + 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); + attron(COLOR_PAIR(1)); + move(1, 10); + for (int i = 1; i <= 19; i++) { + move(1, (11 + i)); + addch('*'); + refresh(); + usleep(ms); + } + attron(COLOR_PAIR(2)); + for (int i = 1; i <= 19; i++) { + move((1 + i),30); + addch('*'); + refresh(); + usleep(ms); + + } + attron(COLOR_PAIR(3)); + for (int i = 1; i <= 19; i++) { + move(20, (30 - i)); + addch('*'); + refresh(); + usleep(ms); + + } + attron(COLOR_PAIR(4)); + for (int i = 1; i <= 19; i++) { + move((20 - i), 11); + addch('*'); + refresh(); + usleep(ms); + + } + + refresh(); + getch(); + delwin(mainwin); + endwin(); + refresh();; +} + |