summaryrefslogtreecommitdiff
path: root/src/sim/cell/materials/sand.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/cell/materials/sand.rs')
-rw-r--r--src/sim/cell/materials/sand.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/sim/cell/materials/sand.rs b/src/sim/cell/materials/sand.rs
new file mode 100644
index 0000000..d2d1265
--- /dev/null
+++ b/src/sim/cell/materials/sand.rs
@@ -0,0 +1,10 @@
+use crate::sim::cell_sim::sim::UpdateCtx;
+
+#[inline]
+pub fn sim_update(ctx: &mut UpdateCtx) {
+ ctx.candidates_swap(&[
+ (0, 1),
+ (-1 + 2 * ctx.seqno_parity as i32, 1),
+ (1 - 2 * ctx.seqno_parity as i32, 1),
+ ]);
+}