refresh
This commit is contained in:
parent
ea86d13e9f
commit
54883b281c
@ -42,7 +42,7 @@ void setup_world(struct state* s, int w, int h) {
|
|||||||
void draw_world(const struct state* s) {
|
void draw_world(const struct state* s) {
|
||||||
if (!s) return;
|
if (!s) return;
|
||||||
|
|
||||||
system("clear"); // или "cls" на Windows
|
system("clear");
|
||||||
|
|
||||||
for (int row = 0; row < s->height; row++) {
|
for (int row = 0; row < s->height; row++) {
|
||||||
for (int col = 0; col < s->width; col++) {
|
for (int col = 0; col < s->width; col++) {
|
||||||
@ -103,7 +103,6 @@ void change_direction(struct state* s, char key) {
|
|||||||
s->sy = 0;
|
s->sy = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// ничего не делаем при некорректном вводе
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user