feat: solved day 8 part 1 and part 2

This commit is contained in:
Stevan Freeborn
2024-12-08 22:49:10 -06:00
parent 174c8dd48e
commit b3a400bc7f
4 changed files with 261 additions and 11 deletions
@@ -0,0 +1,33 @@
namespace ResonantCollinearity.Tests;
public class LineTests
{
private readonly string[] _exampleInput = [
"............",
"........0...",
".....0......",
".......0....",
"....0.......",
"......A.....",
"............",
"............",
"........A...",
".........A..",
"............",
"............",
];
[Test]
public async Task Slope_WhenCalled_ItShouldReturnExpectedValue()
{
var line = new Line(new(3, 4), new(5, 5), _exampleInput);
var result = line.GetAntinodes();
await Assert.That(result).IsEquivalentTo(new List<Point>()
{
new(1, 3),
new(7, 6),
});
}
}