Skip to content

Commit

Permalink
Updated output format
Browse files Browse the repository at this point in the history
  • Loading branch information
wizardassassin committed Jul 10, 2024
1 parent c143428 commit f9edf7a
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Example output
{
"year": 2022,
"day": 1,
"output": { "PartOne": 73211, "PartTwo": 213958 },
"output": { "partOne": 73211, "partTwo": 213958 },
"duration": "0.3455ms"
}
```
Expand Down
4 changes: 2 additions & 2 deletions year-2022/day-01/output.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"PartOne": 73211,
"PartTwo": 213958
"partOne": 73211,
"partTwo": 213958
}
2 changes: 1 addition & 1 deletion year-2022/day-01/solve.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ export default function solve(input) {
);
arr.sort((a, b) => b - a);
const top3Sum = arr.slice(0, 3).reduce((a, b) => a + b);
return { PartOne: Math.max(...arr), PartTwo: top3Sum };
return { partOne: Math.max(...arr), partTwo: top3Sum };
}
4 changes: 2 additions & 2 deletions year-2022/day-02/output.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"PartOne": 13005,
"PartTwo": 11373
"partOne": 13005,
"partTwo": 11373
}
2 changes: 1 addition & 1 deletion year-2022/day-02/solve.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ export default function solve(input) {
.map(([a, b]) => getScore(a, convertCode(a, b)))
.reduce((a, b) => a + b);

return { PartOne: totalScore, PartTwo: totalScore2 };
return { partOne: totalScore, partTwo: totalScore2 };
}
4 changes: 2 additions & 2 deletions year-2022/day-03/output.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"PartOne": 7716,
"PartTwo": 2973
"partOne": 7716,
"partTwo": 2973
}
2 changes: 1 addition & 1 deletion year-2022/day-03/solve.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,5 @@ export default function solve(input) {
.map(getPriority)
.reduce((a, b) => a + b);

return { PartOne: PartOne, PartTwo: PartTwo };
return { partOne: PartOne, partTwo: PartTwo };
}
4 changes: 2 additions & 2 deletions year-2022/day-04/output.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"PartOne": 496,
"PartTwo": 847
"partOne": 496,
"partTwo": 847
}
2 changes: 1 addition & 1 deletion year-2022/day-04/solve.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ export default function solve(input) {
const PartOne = encapsulates.length;
const PartTwo = encapsulates2.length;

return { PartOne: PartOne, PartTwo: PartTwo };
return { partOne: PartOne, partTwo: PartTwo };
}
4 changes: 2 additions & 2 deletions year-2022/day-05/output.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"PartOne": "ZWHVFWQWW",
"PartTwo": "HZFZCCWWV"
"partOne": "ZWHVFWQWW",
"partTwo": "HZFZCCWWV"
}
2 changes: 1 addition & 1 deletion year-2022/day-05/solve.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ export default function solve(input) {
const PartOne = labels.map((x) => board[x][board[x].length - 1]).join("");
const PartTwo = labels.map((x) => board2[x][board2[x].length - 1]).join("");

return { PartOne: PartOne, PartTwo: PartTwo };
return { partOne: PartOne, partTwo: PartTwo };
}
4 changes: 2 additions & 2 deletions year-2022/day-06/output.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"PartOne": 1833,
"PartTwo": 3425
"partOne": 1833,
"partTwo": 3425
}
2 changes: 1 addition & 1 deletion year-2022/day-06/solve.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ export default function solve(input) {
const PartOne = firstIndex;
const PartTwo = secondIndex;

return { PartOne: PartOne, PartTwo: PartTwo };
return { partOne: PartOne, partTwo: PartTwo };
}
4 changes: 2 additions & 2 deletions year-2022/day-15/output.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"PartOne": 6275922,
"PartTwo": 11747175442119
"partOne": 6275922,
"partTwo": 11747175442119
}
2 changes: 1 addition & 1 deletion year-2022/day-15/solve.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,5 @@ export default function solve(input) {
const PartOne = empties;
const PartTwo = outCoord[0] * 4000000 + outCoord[1];

return { PartOne: PartOne, PartTwo: PartTwo };
return { partOne: PartOne, partTwo: PartTwo };
}

0 comments on commit f9edf7a

Please sign in to comment.