}//end createVerticalCoors public RectInt CreateHorizCoors(BinaryTreeNode<RectInt> partitionNode) { RectInt horizontalCoor = new RectInt((partitionNode.Value().width - 2), (partitionNode.Value().height - 1), 1, 2); BinaryTreeNode<RectInt> coorHorzChild = partitionNode.AddCoor(horizontalCoor); //LocalNodeCoorsToWorldCoors(coorHorzChild); cooridors.Add(horizontalCoor); print("horizontal cooridor at: " + horizontalCoor.x + ", " + horizontalCoor.y + " of height and width: " + horizontalCoor.height + ", " + horizontalCoor.width); return horizontalCoor; }//end createHorizCoors
}//end createRoom public RectInt CreateVertCoors(BinaryTreeNode<RectInt> partitionNode) { //if current partition is horizontal, then connect the top and bottom nodes //add a cooridor at a spot at the end of the room RectInt verticalCoor = new RectInt((partitionNode.Value().width - 1), (partitionNode.Value().height - 2), 2, 1); //add to child of partition BinaryTreeNode<RectInt> coorVertChild = partitionNode.AddCoor(verticalCoor); //convert to world coors //LocalNodeCoorsToWorldCoors(coorVertChild); cooridors.Add(verticalCoor); print("vertical cooridor at: " + verticalCoor.x + ", " + verticalCoor.y + " of height and width: " + verticalCoor.height + ", " + verticalCoor.width); return verticalCoor; }//end createVerticalCoors