about summary refs log tree commit diff
path: root/Day13.cs
diff options
context:
space:
mode:
authorBen Harris <ben@tilde.team>2020-12-16 17:17:35 -0500
committerBen Harris <ben@tilde.team>2020-12-16 17:17:35 -0500
commit837527d487c7e232b36dd87c95a15b7852f2e057 (patch)
tree21ddf9a63548ccc8c802fe5f158f3e6743a8e9f1 /Day13.cs
parentc66d1d6b335e6c2f6b544ae31793f318ba2b99a7 (diff)
refactor to two-digit day names and add puzzlename
Diffstat (limited to 'Day13.cs')
-rw-r--r--Day13.cs10
1 files changed, 4 insertions, 6 deletions
diff --git a/Day13.cs b/Day13.cs
index 681126d..4dff712 100644
--- a/Day13.cs
+++ b/Day13.cs
@@ -11,14 +11,12 @@ namespace aoc2019
 
         private readonly IntCodeVM vm;
 
-        public Day13()
+        public Day13() : base(13, "Care Package")
         {
             vm = new IntCodeVM(Input.First());
             board = new Dictionary<(int, int), int>();
         }
 
-        public override int DayNumber => 13;
-
         private void UpdateTiles(IEnumerable<long> queue)
         {
             var input = queue.Select(i => (int) i).ToList();
@@ -65,9 +63,9 @@ namespace aoc2019
         {
             vm.Reset();
             vm.memory[0] = 2;
-            var printboard = false;
+            var printBoard = false;
             var gameTicks = 0;
-            if (printboard) Console.Clear();
+            if (printBoard) Console.Clear();
 
             var haltType = IntCodeVM.HaltType.Waiting;
             while (haltType == IntCodeVM.HaltType.Waiting)
@@ -80,7 +78,7 @@ namespace aoc2019
                 vm.AddInput(ball > paddle ? 1 : ball < paddle ? -1 : 0);
 
                 gameTicks++;
-                if (printboard) PrintBoard();
+                if (printBoard) PrintBoard();
             }
 
             return $"after {gameTicks} moves, the score is: {board[(-1, 0)]}";