Skip to content

Commit 1a6285f

Browse files
committed
Lib: support dotnet run 2022/Day01 format
.vscode: Hitting f5 in a problem folder runs the corresponding solver.
1 parent 94ad372 commit 1a6285f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"preLaunchTask": "build",
1313
// If you have changed target frameworks, make sure to update the program path.
1414
"program": "${workspaceFolder}/bin/Debug/net7.0/adventofcode.dll",
15-
"args": ["today"],
15+
"args": ["${relativeFileDirname}"],
1616
"cwd": "${workspaceFolder}",
1717
// For more information about the 'console' field, see https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md#console-terminal-window
1818
"console": "internalConsole",

App.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@
5050
throw new AocCommuncationError("Event is not active. This option works in Dec 1-25 only)");
5151
}
5252
}) ??
53-
Command(args, Args("([0-9]+)/([0-9]+)"), m => {
53+
Command(args, Args("([0-9]+)/(Day)?([0-9]+)"), m => {
5454
var year = int.Parse(m[0]);
55-
var day = int.Parse(m[1]);
55+
var day = int.Parse(m[2]);
5656
var tsolversSelected = tsolvers.First(tsolver =>
5757
SolverExtensions.Year(tsolver) == year &&
5858
SolverExtensions.Day(tsolver) == day);

0 commit comments

Comments
 (0)