parent
84e21cb515
commit
d6b4f0be32
|
@ -28,7 +28,7 @@ Food generateFood(Player *player)
|
||||||
|
|
||||||
void resetCoordinates(void)
|
void resetCoordinates(void)
|
||||||
{
|
{
|
||||||
printf("\033[0;0H");
|
printf("\e[1;1H\e[2J");
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
|
|
|
@ -36,7 +36,7 @@ bool playerCheckSelfCollision(Player *player)
|
||||||
PlayerNode *nodei, *nodej;
|
PlayerNode *nodei, *nodej;
|
||||||
for (nodei = player->tail; nodei != NULL; nodei = nodei->next)
|
for (nodei = player->tail; nodei != NULL; nodei = nodei->next)
|
||||||
for (nodej = nodei->next; nodej != NULL; nodej = nodej->next)
|
for (nodej = nodei->next; nodej != NULL; nodej = nodej->next)
|
||||||
if (nodei->x == nodej->x && nodei->y == nodej->x)
|
if (nodei->x == nodej->x && nodei->y == nodej->y)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue