improve UI

This commit is contained in:
bePrivate
2023-10-28 20:01:53 +02:00
parent 1bec0f1b3f
commit e58d02fb7d
2 changed files with 8 additions and 6 deletions
BIN
View File
Binary file not shown.
+8 -6
View File
@@ -126,26 +126,28 @@ void clear() {
*/
void show() {
clear();
printf("╔═══╦═══╦═══╦═══╦═══╗\n");
for (int i = 0; i < 6; i++) {
for (int j = 0; j < 5; j++) {
switch (pf_props[i][j][1]) {
case '0':
printf("| %c ", playfield[i][j]);
printf(" %c ", playfield[i][j]);
break;
case '1':
printf("| " RED "%c " RESET, playfield[i][j]);
printf(" " RED "%c " RESET, playfield[i][j]);
break;
case '2':
printf("| " GREEN "%c " RESET, playfield[i][j]);
printf(" " GREEN "%c " RESET, playfield[i][j]);
break;
case '3':
printf("| " YELLOW "%c " RESET, playfield[i][j]);
printf(" " YELLOW "%c " RESET, playfield[i][j]);
break;
}
}
printf("|\n");
printf("\n");
if (i < 5) printf("╠═══╬═══╬═══╬═══╬═══╣\n");
}
printf("\n");
printf("╚═══╩═══╩═══╩═══╩═══╝\n");
}
/*