|
|
@ -150,7 +150,13 @@ void draw_snake(Snake *snake, unsigned char fruit){ |
|
|
|
printf("|"); |
|
|
|
for(int j = 1; j <= WIDTH; j++){ |
|
|
|
int index = part_of_snake(snake, i * 16 + j); |
|
|
|
if(index == 0){printf("0");} |
|
|
|
if(index == 0){ |
|
|
|
switch(snake->direction){ |
|
|
|
case -16: printf("A");break; |
|
|
|
case -1: printf("<");break; |
|
|
|
case 1: printf(">");break; |
|
|
|
case 16: printf("V");break; |
|
|
|
default: break;}} |
|
|
|
else if(index > 0){printf("O");} |
|
|
|
else if(i * 16 + j == fruit){printf("X");} |
|
|
|
else{printf(" ");} |
|
|
|