pub fn protoss_wall_buildings(&self) -> Option<[Point2; 2]> {
		let middle = self.depot_in_middle()?;
		let direction = self.barracks_in_middle()? - middle;

		let mut depots = self.corner_depots()?.to_vec();
		let start = self.start_location;
		depots.sort_unstable_by(|d1, d2| {
			d1.distance_squared(start)
				.partial_cmp(&d2.distance_squared(start))
				.unwrap()
		});

		let wall1 = depots[1] + direction;
		Some([wall1, middle + direction + (middle - wall1) / 1.5])
	}
/// Returns correct positions of 3x3 buildings in protoss wall.
Returns correct positions of 3x3 buildings in protoss wall.
Returns correct positions of 3x3 buildings in protoss wall .
pub fn protoss_wall_buildings(&self) -> Option<[Point2; 2]> {
		let middle = self.depot_in_middle()?;
		let direction = self.barracks_in_middle()? - middle;
		let mut depots = self.corner_depots()?.to_vec();
		let start = self.start_location;
		depots.sort_unstable_by(|d1, d2| {
			d1.distance_squared(start)
				.partial_cmp(&d2.distance_squared(start))
				.unwrap()
		});
		let wall1 = depots[1] + direction;
		Some([wall1, middle + direction + (middle - wall1) / 1.5])
	}
pub fn protoss_wall_buildings ( & self ) -> Option < [ Point2 ; 2 ] > { let middle = self . depot_in_middle ( ) ? ; let direction = self . barracks_in_middle ( ) ? - middle ; let mut depots = self . corner_depots ( ) ? . to_vec ( ) ; let start = self . start_location ; depots . sort_unstable_by ( | d1 , d2 | { d1 . distance_squared ( start ) . partial_cmp ( & d2 . distance_squared ( start ) ) . unwrap ( ) } ) ; let wall1 = depots [ 1 ] + direction ; Some ( [ wall1 , middle + direction + ( middle - wall1 ) / 1.5 ] ) }
Returns correct positions of 3x3 buildings in protoss wall.
Returns correct positions of 3x3 buildings in protoss wall .
&self
&self