Пример #1
0
            public void FetchPossibleMatches_StartFromDifferentPath()
            {
                var shape = new[]
                {
                    "xxxxxxxxxxX....",
                    "x..............",
                    "x..............",
                    "..............."
                };

                BinaryTrack trackBinary     = BinaryTrack.FromString(_gameProps, shape);
                var         possibleMatches = _sut.PossibleTracksWithHeadFilter(trackBinary, BinaryTrack.FromEmpty(_gameProps)).ToList();

                Console.WriteLine($"Total number of matches: {possibleMatches.Count}");
                foreach (var possibleMatch in possibleMatches)
                {
                    Console.WriteLine();
                    Console.WriteLine(possibleMatch);
                }

                Assert.AreEqual(6, possibleMatches.Count);
                CollectionAssert.AreEquivalent(possibleMatches.Select(x => x.Head),
                                               new [] { (10, 0), (11, 0), (12, 0), (10, 1), (11, 1), (12, 1) });