Пример #1
0
        public void SightSeeing(int variant, string point, int expected)
        {
            var layout = CreateLayout(variant);
            var at     = Point.FromString(point);
            var actual = SeatingSystem.CountSightOccupied(layout, at);

            Assert.Equal(expected, actual);
        }
Пример #2
0
        public void CountSightEmpty()
        {
            var input = @"
#.LL.LL.L#
#LLLLLL.LL
L.L.L..L..
LLLL.LL.LL
L.LL.LL.LL
L.LLLLL.LL
..L.L.....
LLLLLLLLL#
#.LLLLLL.L
#.LLLLL.L#".ToLayout();

            var actual = SeatingSystem.CountSightOccupied(input, new Point(2, 0));

            Assert.Equal(1, actual);
            actual = SeatingSystem.CountSightOccupied(input, new Point(3, 0));
            Assert.Equal(0, actual);
        }