piece_connected_edge is still lacking an end condition