Esempio n. 1
0
        public SokobanSolver(string path)
        {
            map = new SokobanSolverMap(path);

            arrayComparer = new ArrayComparer <ushort>();
            moves         = new Dictionary <ushort[], ushort[]>(arrayComparer);
            states        = new Queue <ushort[]>();

            explorer = new SokobanSolverExplorer(map);

            solutionBox  = null;
            solutionPath = null;
            countMoves   = 0;
        }
Esempio n. 2
0
        public SokobanStepper(SokobanSolverMap map)
        {
            this.map = new SokobanSolverMap(map);
            explorer = new SokobanSolverExplorer(this.map);

            newStatesCount = 0;
            newStates      = new ushort[map.boxesCount * 4][];
            accessXYs      = new ushort[map.boxesCount * 4];

            newStatesAvaliableCount = 0;
            distance = new int[map.boxesCount * 4];
            order    = new int[map.boxesCount * 4];

            state = null;
        }