Refactor world simulation and API to enhance world state management; introduce StoredWorldDto for internal bookkeeping, improve synchronization between simulation and API data, and implement new simulation options for idle and catch-up behavior. Update documentation to reflect changes in data structures and API endpoints.
This commit is contained in:
@@ -236,6 +236,21 @@ public sealed class WeatherModelTests
|
||||
Assert.Equal(0f, WeatherModel.UpdateSnowDepth(-5f, -10f, 0f, 0f));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Lying_snow_thins_out_over_the_warmer_parts_of_the_map()
|
||||
{
|
||||
const float pack = 200f;
|
||||
|
||||
// Well below freezing the whole pack shows; the warmer corners of the field go patchy.
|
||||
Assert.Equal(pack, WeatherModel.LocalSnowDepth(pack, -10f), 1);
|
||||
Assert.True(WeatherModel.LocalSnowDepth(pack, 4f) < pack);
|
||||
Assert.True(WeatherModel.LocalSnowDepth(pack, 12f) < WeatherModel.LocalSnowDepth(pack, 4f));
|
||||
|
||||
// It thins rather than vanishing - melting is the integral's job, not the renderer's.
|
||||
Assert.True(WeatherModel.LocalSnowDepth(pack, 30f) > 0f);
|
||||
Assert.Equal(0f, WeatherModel.LocalSnowDepth(0f, -10f));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void A_world_opened_in_deep_winter_already_has_snow_on_the_ground()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user