1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
//! # tslime
//!
//! A lightweight terminal screensaver simulating the mesmerizing growth patterns
//! of *Physarum polycephalum* (slime mold).
//!
//! ## Overview
//!
//! tslime implements the agent-based model from Jones (2010), *"Characteristics
//! of Pattern Formation and Evolution in Approximations of Physarum Transport
//! Networks"* (full citation in [`simulation`]).
//!
//! The simulation involves:
//! 1. **Sense**: Agents sample pheromone trails at three points
//! 2. **Rotate**: Adjust heading based on sensed values
//! 3. **Move**: Update position based on heading and step size
//! 4. **Deposit**: Add pheromone to trail map
//! 5. **Diffuse**: Apply blur to spread pheromone
//! 6. **Decay**: Multiply all trail values by decay factor
//!
//! ## Example
//!
//! ```rust,no_run
//! use tslime::Simulation;
//! use tslime::simulation::config::{SimConfig, InitMode};
//!
//! let config = SimConfig::default();
//! let mut sim = Simulation::new(400, 400, config, 42, InitMode::Random, 0);
//!
//! // Run simulation steps
//! for _ in 0..100 {
//! sim.update(1.0);
//! }
//!
//! // Get trail map for rendering
//! let mut trail = Vec::new();
//! sim.trail_map_blended(&mut trail);
//! ```
//!
/// Application entry point and high-level logic.
/// Restart-only application-level runtime configuration (warmup, auto-reset, grid, food-persist).
pub
/// Choir-mode audio, after Miranda, Adamatzky & Jones (2011), "Sounds
/// Synthesis with Slime Mould of Physarum Polycephalum".
/// Command-line argument parsing and configuration.
/// Centralized configuration defaults.
/// Configuration management (load/save/delete).
/// Error types for structured error handling.
/// Parameter space exploration for preset discovery.
/// Export functionality (GIF, WebM, PNG).
/// Keybind loader and validation.
/// Overlay system (state management, rendering, input).
/// Saved palette management.
/// Per-preset app-runtime defaults.
pub
/// Per-preset optional sim-layer overrides.
pub
/// Shared resolved lever set for presets and saved configs.
pub
/// Single all-Option authored partial (sim ⊕ render ⊕ seed).
pub
/// Rendering logic (ASCII/Unicode, color palettes, dithering).
/// Per-preset render/art-layer defaults.
pub
/// Core simulation logic (agents, trail map).
/// Terminal handling (input, output, raw mode).
/// Validation utilities for configuration.
/// Embedded GUI terminal window (iced_term) for double-click launch.
/// Embedded food image data.
// Re-export commonly used types
pub use Simulation;