def food_eaten(snake_pixels, food_pixel, snake_dir):
    """Check if food has been eaten if so increment length of snake."""
    head = snake_pixels[-1]
    if head == food_pixel:
        new_head = (head[0] + snake_dir[0], head[1] + snake_dir[1])
        snake_pixels.append(new_head)
        return True
    return False