1 package ru.bosony.solvers;
3 import java.io.IOException;
5 import ru.bosony.model.mine.Mine;
8 * @author indvdum (gotoindvdum[at]gmail[dot]com) <br>
15 protected String route = "A";
17 public Solver(Mine mine) {
21 public void start() throws IOException, InterruptedException {
22 Runtime.getRuntime().addShutdownHook(new Thread() {
25 System.out.println(route);
28 AbstractSolver solver = new DijkstraSolver(mine, new SolverListener() {
31 public void foundNextRoute(String newRoute) {
37 public static void main(String[] args) throws IOException, InterruptedException {
39 for (String arg : args) {
42 map = map.replaceAll("\n$", "");
43 Mine mine = new Mine(map);
44 Solver solver = new Solver(mine);