improved ui (added dark mode)
This commit is contained in:
+13
-12
@@ -8,10 +8,11 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#define RESET "\x1b[0m" // color 0
|
#define RESET "\x1b[37;0m" // color 0
|
||||||
#define RED "\x1b[31m" // color 1
|
#define RED "\x1b[37;41m" // color 1
|
||||||
#define GREEN "\x1b[32m" // color 2
|
#define GREEN "\x1b[37;42m" // color 2
|
||||||
#define YELLOW "\x1b[33m" // color 3
|
#define YELLOW "\x1b[37;43m" // color 3
|
||||||
|
#define GRAY "\x1b[37;90m" // color gray
|
||||||
|
|
||||||
char wordlist_path[1024];
|
char wordlist_path[1024];
|
||||||
char wordlist[16384][6]; // 2^14
|
char wordlist[16384][6]; // 2^14
|
||||||
@@ -126,28 +127,28 @@ void clear() {
|
|||||||
*/
|
*/
|
||||||
void show() {
|
void show() {
|
||||||
clear();
|
clear();
|
||||||
printf("╔═══╦═══╦═══╦═══╦═══╗\n");
|
printf(GRAY "╔═══╦═══╦═══╦═══╦═══╗" RESET "\n");
|
||||||
for (int i = 0; i < 6; i++) {
|
for (int i = 0; i < 6; i++) {
|
||||||
for (int j = 0; j < 5; j++) {
|
for (int j = 0; j < 5; j++) {
|
||||||
switch (pf_props[i][j][1]) {
|
switch (pf_props[i][j][1]) {
|
||||||
case '0':
|
case '0':
|
||||||
printf("║ %c ", playfield[i][j]);
|
printf(GRAY "║" RESET " %c ", playfield[i][j]);
|
||||||
break;
|
break;
|
||||||
case '1':
|
case '1':
|
||||||
printf("║ " RED "%c " RESET, playfield[i][j]);
|
printf(GRAY "║" RED " %c " RESET, playfield[i][j]);
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
printf("║ " GREEN "%c " RESET, playfield[i][j]);
|
printf(GRAY "║" GREEN " %c " RESET, playfield[i][j]);
|
||||||
break;
|
break;
|
||||||
case '3':
|
case '3':
|
||||||
printf("║ " YELLOW "%c " RESET, playfield[i][j]);
|
printf(GRAY "║" YELLOW " %c " RESET, playfield[i][j]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("║\n");
|
printf(GRAY "║" RESET "\n");
|
||||||
if (i < 5) printf("╠═══╬═══╬═══╬═══╬═══╣\n");
|
if (i < 5) printf(GRAY "╠═══╬═══╬═══╬═══╬═══╣" RESET "\n");
|
||||||
}
|
}
|
||||||
printf("╚═══╩═══╩═══╩═══╩═══╝\n");
|
printf(GRAY "╚═══╩═══╩═══╩═══╩═══╝" RESET "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user