public void Day22_Example1_Ok() { string[] hand1 = new string[] { "9", "2", "6", "3", "1" }; string[] hand2 = new string[] { "5", "8", "4", "7", "10" }; var sut = new CrabCombatGame(); sut.Deal(hand1, hand2); long actual = sut.PlayMatch(); Assert.Equal(306, actual); }
public void Day22_CrabCombat_Part1_Ok() { var lines = DailyDataUtilities.ReadLinesFromFile("Day22Data.txt"); Assert.Equal(53, lines.Length); var hand1 = lines.Skip(1).Take(25).ToArray(); var hand2 = lines.Skip(28).Take(25).ToArray(); var sut = new CrabCombatGame(); sut.Deal(hand1, hand2); long actual = sut.PlayMatch(); Assert.Equal(34566, actual); }