예제 #1
0
 protected OldGraphBasedGeneratorFactory <TNode> GetOldGenerator <TNode>(BenchmarkOptions options, bool withInit = false)
 {
     return(new OldGraphBasedGeneratorFactory <TNode>(new DungeonGeneratorConfiguration <TNode>()
     {
         EarlyStopIfTimeExceeded = options.EarlyStopTime != null ? TimeSpan.FromMilliseconds(options.EarlyStopTime.Value) : default(TimeSpan?)
     }, withInit));
 }
예제 #2
0
 protected GraphBasedGeneratorFactory <TNode> GetNewGenerator <TNode>(BenchmarkOptions options, bool withInit = false, bool optimizeCorridorConstraints = false, string name = null)
 {
     return(new GraphBasedGeneratorFactory <TNode>(new GraphBasedGeneratorConfiguration <TNode>()
     {
         EarlyStopIfTimeExceeded = options.EarlyStopTime != null ? TimeSpan.FromMilliseconds(options.EarlyStopTime.Value) : default(TimeSpan?),
         OptimizeCorridorConstraints = optimizeCorridorConstraints,
     }, withInit, name));
 }