Изменить 'du7/snake.c'
This commit is contained in:
parent
bcf30cd819
commit
0ca453d4ca
@ -84,7 +84,7 @@ int step_state(struct state* st){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(struct snake* temp = st->snake->next != NULL; temp = temp->next){
|
for(struct snake* temp = st->snake; temp != NULL; temp = temp->next){
|
||||||
if((nx == temp->x && ny == temp->y) || (nx < 0 || nx >= st->width || ny < 0 || ny >= st->height)){
|
if((nx == temp->x && ny == temp->y) || (nx < 0 || nx >= st->width || ny < 0 || ny >= st->height)){
|
||||||
return END_SNAKE;
|
return END_SNAKE;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user