--- a/rust/landgen/src/wavefront_collapse/generator.rs Tue Jan 28 15:57:05 2025 +0100
+++ b/rust/landgen/src/wavefront_collapse/generator.rs Thu Jan 30 13:59:31 2025 +0100
@@ -120,7 +120,6 @@
a => {
for line in bytes.chunks_exact(info.line_size) {
for value in line.chunks_exact(a) {
- print!("{:?},", value);
*tiles_image_pixels
.next()
.expect("vec2d size matching image dimensions") =
--- 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 =