Program.cs 600 B

1234567891011121314151617181920212223242526272829
  1. using System.Diagnostics;
  2. using Day14;
  3. if (args.Any(a => a == "--debug"))
  4. {
  5. Console.WriteLine("DEBUG");
  6. Console.WriteLine(Debugger.Launch());
  7. }
  8. if (args.Length < 1)
  9. {
  10. Console.WriteLine("Requires 1 args: inputFileName");
  11. return -1;
  12. }
  13. var inputFile = args[0];
  14. var parser = new Parser();
  15. var boulderMap = parser.Parse(inputFile);
  16. var load = boulderMap.CalculateMaxNorthLoad();
  17. Console.WriteLine($"North Load: {load}");
  18. Console.WriteLine();
  19. load = boulderMap.Cycle(10000);
  20. Console.WriteLine();
  21. Console.WriteLine($"== North Load: {load}");
  22. return 0;