Example #1
0
        private static string GetDay23Part1()
        {
            var startingNumbers = GetDay23Input();
            var finalState      = CrabCupHelper.PlayCrabCups(startingNumbers, 3, 100);
            var result          = CrabCupHelper.GetCanonicalCrabCupString(finalState);

            return(result);
        }
Example #2
0
        public void GetCanonicalCrabCupStringTest()
        {
            var testData = new List <Tuple <IList <int>, string> >()
            {
                new Tuple <IList <int>, string>(
                    new List <int>()
                {
                    5, 8, 3, 7, 4, 1, 9, 2, 6
                },
                    "92658374")
            };

            foreach (var testExample in testData)
            {
                var actual = CrabCupHelper.GetCanonicalCrabCupString(testExample.Item1);
                Assert.Equal(testExample.Item2, actual);
            }
        }