about summary refs log tree commit diff
path: root/Day14.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Day14.cs')
-rw-r--r--Day14.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Day14.cs b/Day14.cs
index 910c43a..873d74f 100644
--- a/Day14.cs
+++ b/Day14.cs
@@ -24,7 +24,7 @@ namespace aoc2019
             if (quantity <= 0)
                 throw new ArgumentOutOfRangeException(nameof(quantity));
 
-            if (!available!.ContainsKey(chem))
+            if (!available.ContainsKey(chem))
                 available[chem] = 0;
 
             if (available[chem] < quantity && !Produce(chem, quantity - available[chem]))
@@ -46,7 +46,7 @@ namespace aoc2019
                 if (!Consume(reactant.Name, reactionCount * reactant.Quantity))
                     return false;
 
-            available![chem] = available.GetValueOrDefault(chem) + reactionCount * reaction.product.Quantity;
+            available[chem] = available.GetValueOrDefault(chem) + reactionCount * reaction.product.Quantity;
             return true;
         }
 
@@ -68,7 +68,7 @@ namespace aoc2019
             {
             }
 
-            return $"{available["FUEL"]}";
+            return $"{available["FUEL"] + 1}";
         }
 
         private struct Component