improve UI
This commit is contained in:
+8
-6
@@ -126,26 +126,28 @@ void clear() {
|
|||||||
*/
|
*/
|
||||||
void show() {
|
void show() {
|
||||||
clear();
|
clear();
|
||||||
|
printf("╔═══╦═══╦═══╦═══╦═══╗\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("║ %c ", playfield[i][j]);
|
||||||
break;
|
break;
|
||||||
case '1':
|
case '1':
|
||||||
printf("| " RED "%c " RESET, playfield[i][j]);
|
printf("║ " RED "%c " RESET, playfield[i][j]);
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
printf("| " GREEN "%c " RESET, playfield[i][j]);
|
printf("║ " GREEN "%c " RESET, playfield[i][j]);
|
||||||
break;
|
break;
|
||||||
case '3':
|
case '3':
|
||||||
printf("| " YELLOW "%c " RESET, playfield[i][j]);
|
printf("║ " YELLOW "%c " RESET, playfield[i][j]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("|\n");
|
printf("║\n");
|
||||||
|
if (i < 5) printf("╠═══╬═══╬═══╬═══╬═══╣\n");
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("╚═══╩═══╩═══╩═══╩═══╝\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user