Ejemplo n.º 1
0
 private void Print(Level level)
 {
     level.AddSokoban(current.SokobanCoordinate);
     Log.DebugPrint(level.AsText);
     level.RemoveSokoban();
 }
Ejemplo n.º 2
0
        private int GetLowerBound(Node child)
        {
            int lowerBound = GetSimpleLowerBound();

#if false
            int lowerBound = GetSimpleLowerBound();

            int lowerBound = GetTakenLowerBound();

            int lowerBound = GetMatchingLowerBound();

            int lowerBound = 0;
#endif

#if DEBUG
            child.LowerBound = lowerBound;
#endif

            if (verbose && lowerBound < bestLowerBound)
            {
                bestLowerBound = lowerBound;
                bestLevel = new Level(level);
                bestLevel.AddSokoban(current.SokobanRow, current.SokobanColumn);
            }
            return lowerBound;
        }
Ejemplo n.º 3
0
 protected Exception Abort(string message)
 {
     string bugMessage = String.Format("bug: {0}", message);
     Log.DebugPrint(bugMessage);
     Level fullLevel = new Level(level);
     if (fullLevel.Sokobans == 0 && fullLevel.IsEmpty(current.SokobanRow, current.SokobanColumn))
     {
         fullLevel.AddSokoban(current.SokobanRow, current.SokobanColumn);
     }
     Log.DebugPrint(fullLevel.AsText);
     return new InvalidOperationException(bugMessage);
 }