Beispiel #1
0
        public void Load(LibraryComponent lib, string fileName)
        {
            Init();

            var idents = new List <PuzzleIdent>();
            var file   = TrivialNameValueFileFormat.Load(lib.GetPathData(fileName));

            foreach (var pair in file)
            {
                if (pair.Key == "PuzzleExit.Duration")
                {
                    BatchExit.Duration = TimeSpan.FromSeconds(int.Parse(pair.Value));
                }

                if (pair.Key == "BatchExit.Duration")
                {
                    BatchExit.Duration = TimeSpan.FromSeconds(int.Parse(pair.Value));
                }

                if (pair.Key.StartsWith("Puzzle."))
                {
                    idents.Add(PuzzleIdent.Parse(pair.Value));
                }
            }

            AddRange(lib.LoadAllPuzzles(idents));
        }
Beispiel #2
0
        public void LegaxySSX()
        {
            outp.WriteLine(Environment.CurrentDirectory);

            var l   = new LibraryComponent(helper.GetLibraryPath());
            var lib = l.LoadLegacySokoSolve_SSX(l.GetPathData(@"Sasquatch.ssx"));

            Assert.NotNull(lib);
            Assert.Equal(50, lib.Count);
        }
        public override void Init()
        {
            // Setup: Library
            var    path    = new PathHelper();
            var    compLib = new LibraryComponent(path.GetLibraryPath());
            string libName = "SokoSolve-v1\\Microban.ssx";

            //string libName = "SokoSolve-v1\\Sasquatch.ssx";
            library = new LibraryScene(this, compLib.LoadLibrary(compLib.GetPathData(libName)));
            library.Init();

            Current = library;
        }