summaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test.c')
-rw-r--r--test.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/test.c b/test.c
index 606aaa6..d3a75e6 100644
--- a/test.c
+++ b/test.c
@@ -4,7 +4,7 @@
#include <curses.h>
#include <unistd.h>
-#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();