From bc3a82c3d5a8209b5d92a19cc7cf75dacffd8bc8 Mon Sep 17 00:00:00 2001 From: SnakeSkinMan <45136593+SnakeSkinMan@users.noreply.github.com> Date: Fri, 15 Mar 2019 20:38:47 +0800 Subject: [PATCH] Update snake.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [MOD] - UI character error map.c : modify the border of map such as "─","│","┘" snake.c : modify the character of snake such as "io","iA" --- map.c | 6 +++--- snake.c | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/map.c b/map.c index c681a4a..9b03a24 100644 --- a/map.c +++ b/map.c @@ -10,10 +10,10 @@ void map_boundary(int Map_Size) /* Print the boundar boundary.x = Map_Size; boundary.y = Map_Size; for(i = 0; i < Map_Size; i ++) - goprint(Map_Size, i, "©ª"); + goprint(Map_Size, i, "¿"); for(i = 0; i < Map_Size; i ++) - goprint(i, Map_Size, "©¨"); - goprint(Map_Size, Map_Size, "©¼"); + goprint(i, Map_Size, "¿"); + goprint(Map_Size, Map_Size, "¿"); } void map_0(int Map_Size) /* Print the outer blocks */ diff --git a/snake.c b/snake.c index 118354a..48408d0 100644 --- a/snake.c +++ b/snake.c @@ -22,7 +22,7 @@ void snake_create(void) /* Make the snake at snake_tail->y = snake_head->y + 2; snake_tail->next = NULL; for(p = snake_head; p != NULL; p = p->next) - goprint(p->x, p->y, "¡ö"); + goprint(p->x, p->y, "io"); } void snake_control(void) @@ -36,7 +36,7 @@ void snake_control(void) if(control == 'p' || control == 'P') break; if(control == 'w' || control == 's' || control == 'a' || control == 'd' || control == 'W' || control == 'S' || control == 'A' || control == 'D'){ - if((direction == 'w' || direction == 'w') && (control == 's' || control == 'S')) ; + if((direction == 'w' || direction == 'W') && (control == 's' || control == 'S')) ; else if((direction == 's' || direction == 'S') && (control == 'w' || control == 'W')) ; else if((direction == 'a' || direction == 'A') && (control == 'd' || control == 'D')) ; else if((direction == 'd' || direction == 'D') && (control == 'a' || control == 'A')) ; @@ -45,7 +45,7 @@ void snake_control(void) } snake_move(); } - goprint(snake_head->x, snake_head->y, "¡Á"); + goprint(snake_head->x, snake_head->y, "iA"); } void snake_move(void) @@ -117,7 +117,7 @@ void snake_move(void) *temp = front; temp->next = snake_head; snake_head = temp; - goprint(snake_head->x, snake_head->y, "¡ö"); + goprint(snake_head->x, snake_head->y, "io"); if(front.x == award_food.x){ score += award_score / 2 * level; award_food.x = -1, award_food.y = -1, award_score = 100; @@ -137,7 +137,7 @@ void snake_move(void) snake_tail->next = NULL; snake_head->x = front.x; snake_head->y = front.y; - goprint(snake_head->x, snake_head->y, "¡ö"); + goprint(snake_head->x, snake_head->y, "io"); } void snake_free(void) @@ -147,4 +147,4 @@ void snake_free(void) p1 = p1->next; free(p2); } -} \ No newline at end of file +}