private void Print(Level level) { level.AddSokoban(current.SokobanCoordinate); Log.DebugPrint(level.AsText); level.RemoveSokoban(); }
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; }
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); }