Replace spcae and tabs and remove macro

This commit is contained in:
Night Kaly 2024-11-07 00:32:16 +00:00
parent dddb133a62
commit 46d95ea572
Signed by: night0721
SSH key fingerprint: SHA256:B/hgVwUoBpx5vdNsXl9w8XwZljA9766uk6T4ubZp5HM

12
ace.c
View file

@ -6,7 +6,6 @@
#define CLEAR_SCREEN() printf("\033[H\033[J")
#define MOVE_CURSOR(x, y) printf("\033[%d;%dH", (x), (y))
#define RESET_COLOR() printf("\033[0m")
typedef struct {
int value; /* 1 to 13 (Ace to King) */
@ -173,7 +172,8 @@ void display_hand(card hand[], int num_cards, int is_player, int total)
default:
printf("%d%s ", hand[i].value, suits[hand[i].suit]);
}
RESET_COLOR();
/* Reset color */
printf("\033[0m");
}
printf("\n");
@ -184,10 +184,6 @@ void display_hand(card hand[], int num_cards, int is_player, int total)
printf("Total - ");
}
/* Bold and inverted colors */
printf("\033[1m\033[47;30m");
printf(" %d ", total);
RESET_COLOR();
printf("\n");
/* Bold and inverted */
printf("\033[1m\033[47;30m %d \033[0m\n", total);
}