From 713aec5bc3aee80539f86cd6c663678d613d71e1 Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Sun, 15 Dec 2024 13:53:44 -0600 Subject: [PATCH] fix: override to string method --- 14/RestroomRedoubt/Program.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/14/RestroomRedoubt/Program.cs b/14/RestroomRedoubt/Program.cs index 994ec39..21596dd 100644 --- a/14/RestroomRedoubt/Program.cs +++ b/14/RestroomRedoubt/Program.cs @@ -59,7 +59,7 @@ class Simulation robot.Move(_width, _height); } - Debug(i); + // Debug(i); } return _quadrants @@ -67,7 +67,7 @@ class Simulation .Aggregate(1, (current, count) => current * count); } - private void Debug(int time) + public override string ToString() { var lines = new StringBuilder(); @@ -89,8 +89,8 @@ class Simulation lines.AppendLine(row.ToString()); } - - File.WriteAllText(Path.Combine(AppContext.BaseDirectory, $"OUTPUT_{time}.txt"), lines.ToString()); + + return lines.ToString(); } }