/// Returns correct position to build barrack in terran wall without addon.
Returns correct position to build barrack in terran wall without addon.
Returns correct position to build barrack in terran wall without addon .
pub fn barracks_in_middle(&self) -> Option<Point2> {
		let upper_len = self.upper().len();
		if upper_len != 2 && upper_len != 5 {
			return None;
		}
		if let Some(ps) = self.upper2_for_ramp_wall() {
			let p1 = Point2::from(ps[0]);
			let p2 = Point2::from(ps[1]);
			let intersects = p1.circle_intersection(p2, 5_f32.sqrt())?;
			let (x, y) = *self.lower().first()?;
			let lower = Point2::new(x as f32, y as f32);
			return intersects.iter().furthest(lower).copied();
		}
		None
	}
pub fn barracks_in_middle ( & self ) -> Option < Point2 > { let upper_len = self . upper ( ) . len ( ) ; if upper_len != 2 && upper_len != 5 { return None ; } if let Some ( ps ) = self . upper2_for_ramp_wall ( ) { let p1 = Point2 :: from ( ps [ 0 ] ) ; let p2 = Point2 :: from ( ps [ 1 ] ) ; let intersects = p1 . circle_intersection ( p2 , 5_f32 . sqrt ( ) ) ? ; let ( x , y ) = * self . lower ( ) . first ( ) ? ; let lower = Point2 :: new ( x as f32 , y as f32 ) ; return intersects . iter ( ) . furthest ( lower ) . copied ( ) ; } None }
Returns correct position to build barrack in terran wall without addon.
Returns correct position to build barrack in terran wall without addon .
&self