public override string Part1(string input) { var puzzleSolver = new PuzzleSolver(); puzzleSolver.ParseInput(input); if (Debugger.IsAttached) { puzzleSolver.WriteDebugChecksums(); } puzzleSolver.FindMatchingTiles(); return(puzzleSolver.CalculateProductOfCornerTileIDs().ToString()); }
public override string Part2(string input) { var puzzleSolver = new PuzzleSolver(); puzzleSolver.ParseInput(input); if (Debugger.IsAttached) { puzzleSolver.WriteDebugChecksums(); } puzzleSolver.FindMatchingTiles(); if (Debugger.IsAttached) { puzzleSolver.WriteDebugMatches(); } puzzleSolver.StartPuzzling(); int countSeaMonsters = puzzleSolver.CountSeaMonsters(); return(countSeaMonsters.ToString()); }