public static void AfterLevelGenerated(Level level, LevelGenerationConfig config, string levelstem, LevelConfiguration lc, TweakStats tweakStats, TimeSpan ts, CsvWriter csv, Log log, int runcount) { var repdata = GetReport(level, ts, tweakStats); var rep = Report(repdata, multiline: true); log.Info(Report(repdata, multiline: false)); SaveLevelAsText(level, config.seed); if (config.saveCsv) { csv.Write(repdata); } if (config.saveEmpty) { SaveEmpty(level, $"{levelstem}/{lc.GetStr()}-empty-{config.seed} {runcount}.png", subtitle: rep, quiet: true); } if (config.saveEmptyUpperCorner) { SaveEmpty(level, $"{levelstem}/{lc.GetStr()}-corner-{config.seed} {runcount}.png", subtitle: rep, quiet: true, corner: true); } if (config.saveWithPath) { SaveWithPath(level, $"{levelstem}/{lc.GetStr()}-path-{config.seed} {runcount}.png", subtitle: rep, quiet: true); } if (config.saveArrows) { SaveArrowVersions(level, config.seed, levelstem, config.arrowLengthMin); } }
public Log(LevelConfiguration lc) { LevelConfiguration = lc; var logdir = "../../../logs"; if (!System.IO.Directory.Exists(logdir)) { System.IO.Directory.CreateDirectory(logdir); } LogName = $"{logdir}/{lc.GetStr()}.log"; //WL($"Log created at: {LogName}"); }