equal
deleted
inserted
replaced
18 protected long attemptsCount = 0; |
18 protected long attemptsCount = 0; |
19 |
19 |
20 public AbstractSolver(Mine mine, SolverListener listener) { |
20 public AbstractSolver(Mine mine, SolverListener listener) { |
21 this.mine = mine; |
21 this.mine = mine; |
22 this.listener = listener; |
22 this.listener = listener; |
23 solve(); |
|
24 } |
23 } |
25 |
24 |
26 protected void addNewRoute(String route, int score) { |
25 protected void addNewRoute(String route, int score) { |
27 if (!routesWithScore.containsKey(route) && score > getMaxFoundScore()) { |
26 if (!routesWithScore.containsKey(route) && score > getMaxFoundScore()) { |
28 routesWithScore.put(route, score); |
27 routesWithScore.put(route, score); |
37 maxScore = foundScore; |
36 maxScore = foundScore; |
38 } |
37 } |
39 return maxScore; |
38 return maxScore; |
40 } |
39 } |
41 |
40 |
42 protected abstract void solve(); |
41 public abstract void solve(); |
43 } |
42 } |