static void SolveTask(int taskNumber, Rational otherSide) { var spec = new ProblemsRepo().Get(taskNumber); var solver = SolverMaker.CreateSolver(spec); solver = SolverMaker.Solve(solver, otherSide); if (solver == null) { return; } SolverMaker.Visualize(solver); }
static void DrawProblem(int task) { var spec = new ProblemsRepo().Get(task); var graph = Pathfinder.BuildGraph(spec); var viz = new GraphVisualizer <EdgeInfo, NodeInfo>(); viz.GetX = z => z.Data.Location.X; viz.GetY = z => z.Data.Location.Y; //viz.NodeCaption = z => z.Data.Location.ToString() + " ("+z.NodeNumber.ToString()+")"; viz.NodeCaption = z => z.NodeNumber.ToString(); //viz.EdgeCaption = z => z.Data.length.ToString(); viz.Window(600, graph); }