public void PostprocessBasicFov_CorridorIsVisibleButSomeWallsAreNot_WallsOutsideOfVisibilityRangeAreNotVisible()
        {
            /*
             * Illustration (p = square center, i.e. viewer; dot = visible floor, W = visible wall, w = not visible wall):
             *
             * WWwWWw
             * p.....
             * WWWWWw
             *
             */

            var postprocessor = new BasicFovPostprocessor();
            Func <Position, bool> isWalkable = position => position.y == 0;            // see picture, all tiles except those with y=0 are walls.
            var visibleBeforePostprocessing  = new HashSet <Position>
            {
                new Position(0, 1), new Position(1, 1), new Position(3, 1), new Position(4, 1),
                new Position(0, 0), new Position(1, 0), new Position(2, 0), new Position(3, 0), new Position(4, 0), new Position(5, 0),
                new Position(0, -1), new Position(1, -1), new Position(2, -1), new Position(3, -1), new Position(4, -1),
            };
            int rayLength = 5;             // not enough to reach the walls that are most to the right

            IEnumerable <Position> postprocessingResult =
                postprocessor.PostprocessBasicFov(visibleBeforePostprocessing, new Position(0, 0), rayLength, isWalkable);

            postprocessingResult.Should().NotContain(new Position(5, 1));
            postprocessingResult.Should().NotContain(new Position(5, -1));
            postprocessingResult.Should().BeEquivalentTo(new[] { new Position(2, 1) });
        }
        public void PostprocessBasicFov_CorridorIsVisibleButSomeWallsNot_ReturnsWallsInVisibleSet()
        {
            /*
             * Illustration (p = square center, i.e. viewer; dot = visible floor, W = visible wall, w = not visible wall):
             *
             * WWwWWW
             * p.....
             * WWWwWW
             *
             */

            var postprocessor = new BasicFovPostprocessor();
            Func <Position, bool> isWalkable = position => position.y == 0;            // see picture, all tiles except those with y=0 are walls.
            var visibleBeforePostprocessing  = new HashSet <Position>
            {
                new Position(0, 1), new Position(1, 1), new Position(3, 1), new Position(4, 1), new Position(5, 1),
                new Position(0, 0), new Position(1, 0), new Position(2, 0), new Position(3, 0), new Position(4, 0), new Position(5, 0),
                new Position(0, -1), new Position(1, -1), new Position(2, -1), new Position(4, -1), new Position(5, -1),
            };

            IEnumerable <Position> postprocessingResult = postprocessor.PostprocessBasicFov(visibleBeforePostprocessing, new Position(0, 0), 5, isWalkable);

            postprocessingResult.Should().BeEquivalentTo(new[] { new Position(2, 1), new Position(3, -1) });
        }