Align frontend pulse contract and tasks
This commit is contained in:
@@ -67,7 +67,7 @@ public sealed class SimulationEngineTests
|
||||
var next = m_Engine.MoveRobot(level, new(2, 1));
|
||||
|
||||
Assert.Equal(new(2, 1), next.Robot.Position);
|
||||
Assert.Equal(0, next.Global.Turn);
|
||||
Assert.Equal(0, next.Global.Pulse);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -434,6 +434,21 @@ public sealed class SimulationEngineTests
|
||||
Assert.Equal(new(6, 3), loaded.Leaks[0].AccessPosition);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LevelSerializationRoundTripsValveAndSprinklerFields()
|
||||
{
|
||||
var level = SprinklerLevel(EPropSwitchState.Disabled);
|
||||
level = level.SetUnderground(new(3, 3), ECarrierType.Fuel, new() { State = EUndergroundState.Intact });
|
||||
level = level.SetProp(new(3, 3), new() { Type = EPropType.IsolationValve, Carrier = ECarrierType.Fuel, SwitchState = EPropSwitchState.Disabled });
|
||||
|
||||
var loaded = LevelSerializer.Deserialize(LevelSerializer.Serialize(level));
|
||||
|
||||
Assert.Equal(EPropType.IsolationValve, loaded.GetProp(new(3, 3)).Type);
|
||||
Assert.Equal(EPropSwitchState.Disabled, loaded.GetProp(new(3, 3)).SwitchState);
|
||||
Assert.Equal(new(2, 1), loaded.GetProp(new(3, 2)).LinkedPosition);
|
||||
Assert.Equal(new(2, 2), loaded.GetProp(new(2, 1)).OutletPosition);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void LevelSerializationRejectsOldSchema()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user