summaryrefslogtreecommitdiff
path: root/src/sim/cell/materials/gas.rs
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2026-08-23 00:38:32 -0700
committerKai Stevenson <kai@kaistevenson.com>2026-08-23 00:38:32 -0700
commit350c74bc8ef61833be11bbb2bab6747245e3ae0d (patch)
treeb9286d694eaedaef93cf36434a5c80e6aa9e8dce /src/sim/cell/materials/gas.rs
parenta0ff76837ca7ed6bd90cedcfee3832c1d9ad2287 (diff)
refactor out content
Diffstat (limited to 'src/sim/cell/materials/gas.rs')
-rw-r--r--src/sim/cell/materials/gas.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/sim/cell/materials/gas.rs b/src/sim/cell/materials/gas.rs
deleted file mode 100644
index 229d0e9..0000000
--- a/src/sim/cell/materials/gas.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-use rand::RngExt;
-
-use crate::sim::cell_manager::sim::{PostUpdateAction, UpdateCtx};
-
-#[inline]
-pub fn sim_update(ctx: &mut UpdateCtx) -> PostUpdateAction {
- // only allow upward movement some of the time to limit movement speed
- if ctx.rng.random_range(0.0..1.0) > 0.8
- && ctx.swap_or_settle(&[(0, -1)]) == PostUpdateAction::None
- {
- return PostUpdateAction::None;
- }
- // same for each horizontal direction
- if ctx.rng.random_range(0.0..1.0) > 0.8
- && ctx.swap_or_settle(&[(1 - ctx.seqno_parity as i32 * 2, 0)]) == PostUpdateAction::None
- {
- return PostUpdateAction::None;
- }
- if ctx.rng.random_range(0.0..1.0) > 0.8 {
- return ctx.swap_or_settle(&[(-1 + ctx.seqno_parity as i32 * 2, 0)]);
- }
-
- PostUpdateAction::Apply
-}