chore(simulation): cargo fmt atlas modules

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-03 09:46:16 +02:00
co-authored by Claude Opus 4.6
parent 64a873fc1a
commit f1278f88fd
10 changed files with 247 additions and 137 deletions
+14 -6
View File
@@ -74,21 +74,25 @@ mod tests {
fn pioneer_more_irregular_than_commission() {
let pioneer = block_irregularity(400, &PoliticalArchetype::Pioneer);
let commission = block_irregularity(400, &PoliticalArchetype::Commission);
assert!(pioneer > commission,
"Pioneer ({pioneer}) should be more irregular than Commission ({commission})");
assert!(
pioneer > commission,
"Pioneer ({pioneer}) should be more irregular than Commission ({commission})"
);
}
#[test]
fn age_increases_irregularity() {
let young = block_irregularity(50, &PoliticalArchetype::Industrial);
let old = block_irregularity(800, &PoliticalArchetype::Industrial);
assert!(old > young,
"Older settlement ({old}) should be more irregular than young ({young})");
assert!(
old > young,
"Older settlement ({old}) should be more irregular than young ({young})"
);
}
#[test]
fn max_offset_scales_with_irregularity() {
assert_eq!(max_offset_sim_tiles(0.05), 0); // 0.05 × 16 = 0.8 → 0
assert_eq!(max_offset_sim_tiles(0.05), 0); // 0.05 × 16 = 0.8 → 0
assert_eq!(max_offset_sim_tiles(1.0), 16);
assert_eq!(max_offset_sim_tiles(0.5), 8);
}
@@ -105,7 +109,11 @@ mod tests {
];
for a in &archetypes {
let v = block_irregularity(300, a);
assert!(v >= 0.05 && v <= 1.0, "archetype {:?} gave {v} out of [0.05, 1.0]", a);
assert!(
v >= 0.05 && v <= 1.0,
"archetype {:?} gave {v} out of [0.05, 1.0]",
a
);
}
}
}