mirror of
https://github.com/Xevion/smart-rgb.git
synced 2025-12-15 00:13:12 -06:00
Update source files
This commit is contained in:
33
crates/borders-core/tests/common/fixtures.rs
Normal file
33
crates/borders-core/tests/common/fixtures.rs
Normal file
@@ -0,0 +1,33 @@
|
||||
//! Pre-built test scenarios for integration tests
|
||||
//!
|
||||
//! These fixtures represent common complex scenarios used across multiple tests.
|
||||
//! They are lazily initialized on first use.
|
||||
use once_cell::sync::Lazy;
|
||||
use std::sync::Arc;
|
||||
|
||||
use super::builders::MapBuilder;
|
||||
use borders_core::prelude::*;
|
||||
|
||||
/// Standard 100x100 plains map (all conquerable)
|
||||
pub static PLAINS_MAP: Lazy<Arc<TerrainData>> = Lazy::new(|| Arc::new(MapBuilder::new(100, 100).all_conquerable().build()));
|
||||
|
||||
/// Island archipelago map: 50x50 islands separated by water
|
||||
pub static ISLAND_MAP: Lazy<Arc<TerrainData>> = Lazy::new(|| Arc::new(MapBuilder::new(100, 100).islands().build()));
|
||||
|
||||
/// Continental map: vertical strips of land and water
|
||||
pub static CONTINENT_MAP: Lazy<Arc<TerrainData>> = Lazy::new(|| Arc::new(MapBuilder::new(100, 100).continents().build()));
|
||||
|
||||
/// Get a clone of the plains map
|
||||
pub fn get_plains_map() -> TerrainData {
|
||||
(*PLAINS_MAP.clone()).clone()
|
||||
}
|
||||
|
||||
/// Get a clone of the island map
|
||||
pub fn get_island_map() -> TerrainData {
|
||||
(*ISLAND_MAP.clone()).clone()
|
||||
}
|
||||
|
||||
/// Get a clone of the continent map
|
||||
pub fn get_continent_map() -> TerrainData {
|
||||
(*CONTINENT_MAP.clone()).clone()
|
||||
}
|
||||
Reference in New Issue
Block a user