예제 #1
0
 public FrameData(IGraphSolver <Position> solver, ICollection <Position> checkedPositions, double frameSeconds,
                  double overallSeconds)
 {
     CheckedPositions = checkedPositions;
     State            = solver.State;
     OpenCount        = solver.OpenCount;
     ClosedCount      = solver.ClosedCount;
     CurrentBestPath  = solver.CurrentBestPath;
     Path             = solver.Path;
     PathCost         = solver.PathCost;
     FrameSeconds     = frameSeconds;
     OverallSeconds   = overallSeconds;
 }
예제 #2
0
 public IEnumerable <Route> TrySolveWith(IGraphSolver solver)
 {
     return(solver.TrySolve(this));
 }
 public TransactionBusinessService(IGraphSolver graphSolver, IAmountService amountService, ILogger <TransactionBusinessService> logger)
 {
     _graphSolver   = graphSolver;
     _amountService = amountService;
     _logger        = logger;
 }
예제 #4
0
 private void PrintEndPoints(IGraphSolver <Position> astar)
 {
     _worldWriter.DrawPosition(astar.Origin.X, astar.Origin.Y, PositionType.End);
     _worldWriter.DrawPosition(astar.Destination.X, astar.Destination.Y, PositionType.End);
 }
예제 #5
0
 public UseSolver(IGraphSolver graphSolver, string solver)
 {
     this.graphSolver = graphSolver;
     this.solver      = solver;
 }
 public static IRequestHandler Solver(IGraphSolver graphSolver, string solver)
 {
     return(new UseSolver(graphSolver, solver));
 }