Validate pipe connections, see day 10 - 2023
Arguments
- env
Environment with the current field,
x.- chr
Character with current position's element.
- pos
Data frame with current position (
i,j).- remove_original
Boolean flag to indicate if the current tile should be removed from the original field (i.e., changed to ".").
- k
Integer with the number of
knearest neighbours to return.