Пример #1
0
        public void Write(Stream stream, MazeGridSettings mazeSettings)
        {
            RenderGrid renderGrid = new MazeGridFactory(mazeSettings).CreateRenderGrid();
            var        factory    = new TreeComponentFactory();
            var        renderer   = new NormalGameLevelRenderer(
                factory.CreateBackgroundRenderers(),
                factory.CreateGroundRenderers(),
                factory.CreateWallRenderers(),
                factory.CreateSettings());

            using (renderer)
            {
                renderer.Render(renderGrid, stream);
            }
        }
Пример #2
0
            public void Write(Stream stream)
            {
                RenderGrid renderGrid = ComplexMazeFixture.Create();
                var        factory    = new TestComponentFactory();
                var        renderer   = new NormalGameLevelRenderer(
                    factory.CreateBackgroundRenderers(),
                    factory.CreateGroundRenderers(),
                    factory.CreateWallRenderers(),
                    factory.CreateSettings());

                using (renderer)
                {
                    renderer.Render(renderGrid, stream);
                }
            }