Esempio n. 1
0
    public static void Y2016_Day21_Scramble_Returns_Correct_Solution(string text, bool reverse, string expected)
    {
        // Arrange
        string[] instructions = new[]
        {
            "swap position 4 with position 0",
            "swap letter d with letter b",
            "reverse positions 0 through 4",
            "rotate left 1 step",
            "move position 1 to position 4",
            "move position 3 to position 0",
            "rotate based on position of letter b",
            "rotate based on position of letter d",
        };

        // Act
        string actual = Day21.Scramble(text, instructions, reverse);

        // Assert
        actual.ShouldBe(expected);
    }