forked from nakidai/csnake
1
0
Fork 0

Remove functions for free screen and player as they're unused

Nakidai 2023-12-01 23:07:02 +03:00
parent 517e57cfc5
commit 1685dc927b
4 changed files with 0 additions and 13 deletions

View File

@ -22,7 +22,6 @@ struct player_t
}; };
Player *playerCreate(Direction direction, int x, int y, int score); Player *playerCreate(Direction direction, int x, int y, int score);
void playerFree(Player *player);
bool playerCheckSelfCollision(Player *player); bool playerCheckSelfCollision(Player *player);
bool playerCheckFoodCollision(Player *player, Food food); bool playerCheckFoodCollision(Player *player, Food food);

View File

@ -12,8 +12,6 @@ typedef struct screen_t
} Screen; } Screen;
Screen *screenCreate(int width, int height, Point fill_value); Screen *screenCreate(int width, int height, Point fill_value);
void screenFree(Screen *screen);
void screenShow(Screen *screen); void screenShow(Screen *screen);
static inline Point *screenGetPoint(Screen *screen, int x, int y) static inline Point *screenGetPoint(Screen *screen, int x, int y)

View File

@ -19,10 +19,6 @@ Player *playerCreate(Direction direction, int x, int y, int score)
return player; return player;
} }
void playerFree(Player *player)
{
}
bool playerCheckFoodCollision(Player *player, Food food) bool playerCheckFoodCollision(Player *player, Food food)
{ {
for (PlayerNode *node = player->tail; node != NULL; node = node->next) for (PlayerNode *node = player->tail; node != NULL; node = node->next)

View File

@ -15,12 +15,6 @@ Screen *screenCreate(int width, int height, Point fill_value)
return out; return out;
} }
void screenFree(Screen *screen)
{
free(screen->screen);
free(screen);
}
void screenShow(Screen *screen) void screenShow(Screen *screen)
{ {
int x, y, i; int x, y, i;