private static void Day10() { var lines = File.ReadAllLines(@"..\..\Day10\input.txt"); var d10 = new Day10.Day10(lines); d10.Process(); }
public void BotPassesCorrectValue() { string[] lines = { "value 5 goes to bot 2", "bot 2 gives low to bot 1 and high to bot 0", "value 3 goes to bot 1", "bot 1 gives low to output 1 and high to bot 0", "bot 0 gives low to output 2 and high to output 0", "value 2 goes to bot 2" }; var sut = new AdventOfCode2016.Day10.Day10(lines); sut.Process(); Assert.True(sut.DestinationHasValue("output1", value: 2)); Assert.True(sut.DestinationHasValue("output2", value: 3)); Assert.True(sut.DestinationHasValue("output0", value: 5)); Assert.False(sut.DestinationHasValue("bot2", value: 2)); Assert.False(sut.DestinationHasValue("bot1", value: 3)); Assert.False(sut.DestinationHasValue("bot2", value: 5)); }