Solve 2024-08

This commit is contained in:
2024-12-08 19:48:41 +01:00
parent 0d36b97a28
commit 532913e039
4 changed files with 134 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
import { describe, expect, it } from 'bun:test';
import { solveFirst, solveSecond } from './index.ts';
describe('2024-08', () => {
const testInput = `............
........0...
.....0......
.......0....
....0.......
......A.....
............
............
........A...
.........A..
............
............`;
it('first', () => {
expect(solveFirst(testInput)).toBe(14);
});
it('second', () => {
const secondTest = `T.........
...T......
.T........
..........
..........
..........
..........
..........
..........
..........`;
expect(solveSecond(testInput)).toBe(34);
expect(solveSecond(secondTest)).toBe(9);
});
});