I'm writing a program to play 4 in a row using C90.
I made a UI for the Console using ASCII characters.
If I compile the program using C Lion I get the following output:
If I compile it using gcc main.c and then run ./a.out I get the following result:
So obviously this dot character is sized differently if I compile it using gcc directly.
Has anyone any idea how this could possibly happen?
The code that is responsible for printing the game lines looks like this:
void printGameLine(int line[7]) {
int i;
printf("┃");
for (i = 0; i < 7; ++i) {
printColor(line[i]);
line[i] == 0 ? printf("") : printf("⬤ ");
printColor(0);
printf("┃");
}
printf("\n");
}
The code responsible for the colors looks like this: (If this makes any difference)
/**
* prints the color
* @param player -1 First player, 0 neutral, 1 Second Player
*/
void printColor(int player) {
switch (player) {
case 1:
printf("\033[0;31m"); /*red*/
break;
case -1:
printf("\033[0;33m");/*yellow*/
break;
default:
printf("\033[0m");/*neutral*/
break;
}
}