Exemple #1
0
    public void Y2021_Day05_NavigateVents_Returns_Correct_Value(bool useDiagonals, int expected)
    {
        // Arrange
        string[] game =
        {
            "0,9 -> 5,9",
            "8,0 -> 0,8",
            "9,4 -> 3,4",
            "2,2 -> 2,1",
            "7,0 -> 7,4",
            "6,4 -> 2,0",
            "0,9 -> 2,9",
            "3,4 -> 1,4",
            "0,0 -> 8,8",
            "5,5 -> 8,2",
        };

        // Act
        int actual = Day05.NavigateVents(game, useDiagonals);

        // Assert
        actual.ShouldBe(expected);
    }