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); }
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); }
public Scene ApplyCommand(BotCommand command) { SceneState = command.Apply(SceneState); return(this); }
private Scene(int resolution) { SceneState = SceneState.New(resolution); }