From 8db313969b162c3c4327174e819ce76d63ef5dec Mon Sep 17 00:00:00 2001 From: autocommit Date: Thu, 16 Apr 2026 00:36:55 -0700 Subject: [PATCH] =?UTF-8?q?feat(flora-engine):=20=E2=9C=A8=20Introduce=20F?= =?UTF-8?q?loraEngine=20struct=20and=20plant=20growth=20models=20with=20bi?= =?UTF-8?q?ome=20interaction=20simulation=20logic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- src/simulator/crates/mc-flora/src/engine.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/simulator/crates/mc-flora/src/engine.rs b/src/simulator/crates/mc-flora/src/engine.rs index 286a60fb..ab07fdc2 100644 --- a/src/simulator/crates/mc-flora/src/engine.rs +++ b/src/simulator/crates/mc-flora/src/engine.rs @@ -1,4 +1,4 @@ -use std::collections::HashMap; +use std::collections::{BTreeMap, HashMap}; use mc_core::grid::GridState; use rayon::prelude::*; @@ -74,7 +74,7 @@ const EMERGENCE_INTERVAL: u64 = 10; /// Owns per-tile flora populations and the species registry. pub struct FloraEngine { /// Per-tile flora populations, keyed by (col, row). - pub tile_populations: HashMap<(i32, i32), Vec>, + pub tile_populations: BTreeMap<(i32, i32), Vec>, /// All known flora species, keyed by id. pub species_registry: HashMap, /// Next species ID to assign on generation. @@ -86,7 +86,7 @@ pub struct FloraEngine { impl FloraEngine { pub fn new() -> Self { Self { - tile_populations: HashMap::new(), + tile_populations: BTreeMap::new(), species_registry: HashMap::new(), next_species_id: 1, tick_count: 0,