sandspiel
sandspiel copied to clipboard
Density error for dust
Oil floats on water, dust floats on oil. But dust sinks in water. If dust is light enough to float on oil then it should float on water too.
This error is caused by the behavior of Dust
with Water
. Take a look at these lines
https://github.com/MaxBittker/sandspiel/blob/11d838bc07973cf1610dcd28107eece39b5aa178/crate/src/species.rs#L116-L128
These conditions only explicitly define dust's interaction with one other cell species: Water
. The relevent conditions make it so that if there is Water
underneath a Dust
particle, the particle moves down. Otherwise, the dust stays where it is. This means that it sits on top of oil, but sinks in water.
Would you consider this an oversight (dust should sink in all liquids instead of just water) or should dust float on everything instead?