Пример #1
0
        public Maze CreateMaze(MazeBuilder builder)
        {
            builder.BuildMaze();
            builder.BuildRoom(1);
            builder.BuildRoom(2);
            builder.BuildDoor(1, 2);

            return(builder.GetMaze());
        }
Пример #2
0
        public Maze CreateComplexMaze(MazeBuilder builder)
        {
            // MazeBuilder can be reused to create differnt kinds of mazes.
            // Pretend this is a complex maze

            builder.BuildMaze();
            builder.BuildRoom(1);
            builder.BuildRoom(2);
            builder.BuildDoor(1, 2);

            builder.BuildRoom(3);
            builder.BuildRoom(4);
            builder.BuildDoor(3, 4);

            return(builder.GetMaze());
        }