Пример #1
0
        public static SceneState FromMatrix(Matrix matrix)
        {
            var sceneState = new SceneState
            {
                Energy        = 0,
                HarmonicsMode = HarmonicsMode.Grounded,
                Matrix        = matrix,
            };

            sceneState.Bots = new SortedSet <NanoBot>(
                new[] { NanoBot.Initial() },
                new NanoBotComparer());

            return(sceneState);
        }
Пример #2
0
        public static SceneState New(int resolution)
        {
            var sceneState = new SceneState
            {
                Energy        = 0,
                HarmonicsMode = HarmonicsMode.Grounded,
                Matrix        = Matrix.Empty(resolution),
            };

            sceneState.Bots = new SortedSet <NanoBot>(
                new[] { NanoBot.Initial() },
                new NanoBotComparer());

            return(sceneState);
        }