Ejemplo n.º 1
0
        public void TestSerializeScenario()
        {
            var scenario = new Tutorial1_Movement().GenerateScenario();

            var json = ConfigurationSerializer.SerializeScenario(scenario);

            // TODO: this will fail because of the use of generic func<T> which cannot currently be deseiralized
            // this can be replaced by some types implementing IPlayerConfigFactory, but this rather restricts the signature and lightweightness of the configuration
            // thid might not be such an issue with reference preservation in the serializer
            var scenarioCopy = ConfigurationSerializer.DeserializeScenario <SimulationScenario>(json);
        }