[Solved] The head of the snake is a couple points away from the body (c++ game) [closed]
I think your problem is probably partly in the get_next_position_to function, where you increment the position of the body part passed into the function. I think this should probably only add. The ‘RIGHT’ case also modifies both X and Y. position_t get_position_next_to(body_part_t *part) { position_t pos; switch(part->dir) { case UP: initialize_position(&pos, part->pos.x, part->pos.y + 1); … Read more