improve UI
This commit is contained in:
+8
-6
@@ -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");
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user