Ejemplo n.º 1
0
 public GrowingTreeAlgorithm(IRandomPointGenerator randomPointGenerator, IRandomValueGenerator randomValueGenerator, IDirectionsFlagParser directionsFlagParser, IArrayHelper arrayHelper)
 {
     _randomPointGenerator = randomPointGenerator;
     _randomValueGenerator = randomValueGenerator;
     _directionsFlagParser = directionsFlagParser;
     _arrayHelper          = arrayHelper;
 }
Ejemplo n.º 2
0
 ///// <summary>
 ///// Returns a closed xml workbook
 ///// </summary>
 internal ExcelWorkbook(IArrayHelper arrayHelper, IClosedXMLHelper closedXmlHelper)
 {
     _arrayHelper       = arrayHelper;
     _closedXMLHelper   = closedXmlHelper;
     Package            = ExcelPackage.ClosedXml;
     _closedXmlWorkbook = new XLWorkbook();
 }
Ejemplo n.º 3
0
 public RandomCarver(IRandomPointGenerator randomPointGenerator, IPointsAndDirectionsRetriever pointsAndDirectionsRetriever, IDirectionsFlagParser directionsFlagParser, IArrayHelper arrayHelper)
 {
     _randomPointGenerator         = randomPointGenerator;
     _pointsAndDirectionsRetriever = pointsAndDirectionsRetriever;
     _directionsFlagParser         = directionsFlagParser;
     _arrayHelper = arrayHelper;
 }
 public BinaryTreeAlgorithm(IMazeHelper mazeHelper, IArrayHelper arrayHelper)
 {
     _mazeHelper  = mazeHelper;
     _arrayHelper = arrayHelper;
     _directions  = new List <Direction>()
     {
         Direction.Left, Direction.Up, Direction.Forward
     };
 }
Ejemplo n.º 5
0
        internal ExcelWorkbook(ExcelPackage excelPackage, string filePath, IArrayHelper arrayHelper,
                               IClosedXMLHelper closedXmlHelper)
        {
            Package          = excelPackage;
            _arrayHelper     = arrayHelper;
            _closedXMLHelper = closedXmlHelper;

            switch (excelPackage)
            {
            case ExcelPackage.ClosedXml:
                _closedXmlWorkbook = new XLWorkbook(filePath);
                break;

            default:
                _excelApplication = (Interop.Application)Marshal.GetActiveObject(_excelApplicationName);
                string workbookName = GetWorkbookName(filePath);
                _interopWorkbook = _excelApplication.Workbooks[workbookName];
                break;
            }
        }
Ejemplo n.º 6
0
        public ExperimentRunner(IMazeGenerationFactory mazeGenerationFactory, IArrayHelper arrayHelper, IOutputWriter outputWriter, IDirectionsFlagParser directionsFlagParser)
        {
            _mazeGenerationFactory = mazeGenerationFactory;
            _arrayHelper           = arrayHelper;
            _outputWriter          = outputWriter;
            _directionsFlagParser  = directionsFlagParser;

            Settings1 = new MazeGenerationSettings
            {
                Algorithm   = Algorithm.BinaryTreeAlgorithm,
                AgentType   = AgentType.None,
                DoorsAtEdge = true,
                ExtraWalls  = WallCarverOption.Random,
                Option      = MazeType.DirectedMaze,
                Size        = new MazeSize {
                    X = 25, Y = 25, Z = 25
                }
            };

            Settings2 = new MazeGenerationSettings
            {
                Algorithm   = Algorithm.BinaryTreeAlgorithm,
                AgentType   = AgentType.None,
                DoorsAtEdge = false,
                ExtraWalls  = WallCarverOption.Random,
                Option      = MazeType.DirectedMaze,
                Size        = new MazeSize {
                    X = 25, Y = 25, Z = 25
                }
            };

            Settings3 = new MazeGenerationSettings
            {
                Algorithm   = Algorithm.RecursiveBacktrackerAlgorithm,
                AgentType   = AgentType.None,
                DoorsAtEdge = true,
                ExtraWalls  = WallCarverOption.Random,
                Option      = MazeType.DirectedMaze,
                Size        = new MazeSize {
                    X = 25, Y = 25, Z = 25
                }
            };

            Settings4 = new MazeGenerationSettings
            {
                Algorithm   = Algorithm.RecursiveBacktrackerAlgorithm,
                AgentType   = AgentType.None,
                DoorsAtEdge = false,
                ExtraWalls  = WallCarverOption.Random,
                Option      = MazeType.DirectedMaze,
                Size        = new MazeSize {
                    X = 25, Y = 25, Z = 25
                }
            };

            Settings5 = new GrowingTreeSettings
            {
                Algorithm   = Algorithm.GrowingTreeAlgorithm,
                AgentType   = AgentType.None,
                DoorsAtEdge = true,
                ExtraWalls  = WallCarverOption.Random,
                Option      = MazeType.DirectedMaze,
                Size        = new MazeSize {
                    X = 25, Y = 25, Z = 25
                },
                Strategies = new List <GrowingTreeStrategy> {
                    GrowingTreeStrategy.Newest
                }
            };

            Settings6 = new GrowingTreeSettings
            {
                Algorithm   = Algorithm.GrowingTreeAlgorithm,
                AgentType   = AgentType.None,
                DoorsAtEdge = false,
                ExtraWalls  = WallCarverOption.Random,
                Option      = MazeType.DirectedMaze,
                Size        = new MazeSize {
                    X = 25, Y = 25, Z = 25
                },
                Strategies = new List <GrowingTreeStrategy> {
                    GrowingTreeStrategy.Newest
                }
            };

            Settings7 = new GrowingTreeSettings
            {
                Algorithm   = Algorithm.GrowingTreeAlgorithm,
                AgentType   = AgentType.None,
                DoorsAtEdge = true,
                ExtraWalls  = WallCarverOption.Random,
                Option      = MazeType.DirectedMaze,
                Size        = new MazeSize {
                    X = 25, Y = 25, Z = 25
                },
                Strategies = new List <GrowingTreeStrategy> {
                    GrowingTreeStrategy.Random
                }
            };

            Settings8 = new GrowingTreeSettings
            {
                Algorithm   = Algorithm.GrowingTreeAlgorithm,
                AgentType   = AgentType.None,
                DoorsAtEdge = false,
                ExtraWalls  = WallCarverOption.Random,
                Option      = MazeType.DirectedMaze,
                Size        = new MazeSize {
                    X = 25, Y = 25, Z = 25
                },
                Strategies = new List <GrowingTreeStrategy> {
                    GrowingTreeStrategy.Random
                }
            };

            Settings9 = new GrowingTreeSettings
            {
                Algorithm   = Algorithm.GrowingTreeAlgorithm,
                AgentType   = AgentType.None,
                DoorsAtEdge = true,
                ExtraWalls  = WallCarverOption.Random,
                Option      = MazeType.DirectedMaze,
                Size        = new MazeSize {
                    X = 25, Y = 25, Z = 25
                },
                Strategies = new List <GrowingTreeStrategy> {
                    GrowingTreeStrategy.Newest, GrowingTreeStrategy.Newest, GrowingTreeStrategy.Newest, GrowingTreeStrategy.RandomOldest, GrowingTreeStrategy.Middle
                }
            };

            Settings10 = new GrowingTreeSettings
            {
                Algorithm   = Algorithm.GrowingTreeAlgorithm,
                AgentType   = AgentType.None,
                DoorsAtEdge = false,
                ExtraWalls  = WallCarverOption.Random,
                Option      = MazeType.DirectedMaze,
                Size        = new MazeSize {
                    X = 25, Y = 25, Z = 25
                },
                Strategies = new List <GrowingTreeStrategy> {
                    GrowingTreeStrategy.Newest, GrowingTreeStrategy.Newest, GrowingTreeStrategy.Newest, GrowingTreeStrategy.RandomOldest, GrowingTreeStrategy.Middle
                }
            };

            Settings11 = new GrowingTreeSettings
            {
                Algorithm   = Algorithm.GrowingTreeAlgorithm,
                AgentType   = AgentType.None,
                DoorsAtEdge = true,
                ExtraWalls  = WallCarverOption.Random,
                Option      = MazeType.DirectedMaze,
                Size        = new MazeSize {
                    X = 25, Y = 25, Z = 25
                },
                Strategies = new List <GrowingTreeStrategy> {
                    GrowingTreeStrategy.Newest, GrowingTreeStrategy.Oldest
                }
            };

            Settings12 = new GrowingTreeSettings
            {
                Algorithm   = Algorithm.GrowingTreeAlgorithm,
                AgentType   = AgentType.None,
                DoorsAtEdge = false,
                ExtraWalls  = WallCarverOption.Random,
                Option      = MazeType.DirectedMaze,
                Size        = new MazeSize {
                    X = 25, Y = 25, Z = 25
                },
                Strategies = new List <GrowingTreeStrategy> {
                    GrowingTreeStrategy.Newest, GrowingTreeStrategy.Oldest
                }
            };
        }
 public BacktrackerAlgorithm(IDirectionsFlagParser directionsFlagParser, IRandomPointGenerator randomPointGenerator, IArrayHelper arrayHelper)
 {
     _directionsFlagParser = directionsFlagParser;
     _randomPointGenerator = randomPointGenerator;
     _arrayHelper          = arrayHelper;
 }
Ejemplo n.º 8
0
 public ExcelWorkbookFactory()
 {
     _arrayHelper     = new ArrayHelper();
     _closedXmlHelper = new ClosedXMLHelper();
 }
 public PerfectAgent(IDirectionsFlagParser directionsFlagParser, IArrayHelper arrayHelper)
 {
     _directionsFlagParser = directionsFlagParser;
     _arrayHelper          = arrayHelper;
 }
 public AgentFactory(IDirectionsFlagParser directionsFlagParser, IPointsAndDirectionsRetriever pointsAndDirectionsRetriever, IArrayHelper arrayHelper)
 {
     _directionsFlagParser         = directionsFlagParser;
     _pointsAndDirectionsRetriever = pointsAndDirectionsRetriever;
     _arrayHelper = arrayHelper;
 }
Ejemplo n.º 11
0
 public RandomAgent2(IPointsAndDirectionsRetriever pointsAndDirectionsRetriever, IDirectionsFlagParser directionsFlagParser, IArrayHelper arrayHelper)
 {
     _pointsAndDirectionsRetriever = pointsAndDirectionsRetriever;
     _directionsFlagParser         = directionsFlagParser;
     _arrayHelper = arrayHelper;
 }
Ejemplo n.º 12
0
 public RandomAgent(IArrayHelper arrayHelper)
 {
     _arrayHelper = arrayHelper;
 }