use crate::model::Variant;
pub fn initial_cross(variant: Variant) -> Vec<(i16, i16)> {
let n = variant.line_len() as i16;
let arm = n - 1; let w = if n % 2 == 1 { 2 * n - 1 } else { 2 * n - 2 }; let a = (w - (arm - 1)) / 2; let b = a + arm - 1;
let mut pts = Vec::new();
for x in 0..=w {
for y in 0..=w {
let in_cross = ((y == 0 || y == w) && (a..=b).contains(&x))
|| ((x == 0 || x == w) && (a..=b).contains(&y))
|| ((x == a || x == b) && (y <= a || y >= b))
|| ((y == a || y == b) && (x <= a || x >= b));
if in_cross {
pts.push((x, y));
}
}
}
pts
}