private bool try_align(c_tile neighbor) { if (this.compute_edge_id(k_edge_index_top) == neighbor.compute_edge_id(k_edge_index_bottom)) { this.top_neighbor = neighbor; neighbor.bottom_neighbor = this; return(true); } if (this.compute_edge_id(k_edge_index_bottom) == neighbor.compute_edge_id(k_edge_index_top)) { this.bottom_neighbor = neighbor; neighbor.top_neighbor = this; return(true); } if (this.compute_edge_id(k_edge_index_left) == neighbor.compute_edge_id(k_edge_index_right)) { this.left_neighbor = neighbor; neighbor.right_neighbor = this; return(true); } if (this.compute_edge_id(k_edge_index_right) == neighbor.compute_edge_id(k_edge_index_left)) { this.right_neighbor = neighbor; neighbor.left_neighbor = this; return(true); } return(false); }