rust/landgen/src/wavefront_collapse/wavefront_collapse.rs
changeset 16075 2c2b094e6bbe
parent 16073 5d302b12d837
child 16079 65c017453e83
--- a/rust/landgen/src/wavefront_collapse/wavefront_collapse.rs	Tue Jan 28 15:57:05 2025 +0100
+++ b/rust/landgen/src/wavefront_collapse/wavefront_collapse.rs	Thu Jan 30 13:59:31 2025 +0100
@@ -160,7 +160,7 @@
                     let entropy = possibilities.len();
                     if entropy > 0 {
                         if entropy <= tiles_to_collapse.0 {
-                            let weights = possibilities.iter().map(|(weight, _)| *weight);
+                            let weights = possibilities.iter().map(|(weight, _)| weight.pow(2));
                             let distribution = WeightedIndex::new(weights).unwrap();
 
                             let entry =