| author | indvdum (gotoindvdum[at]gmail[dot]com) |
| Mon, 16 Jul 2012 13:08:03 +0400 | |
| changeset 40 | daa0ff48b7d0 |
| parent 39 | 27b98e729716 |
| child 44 | b87d85a52577 |
| permissions | -rw-r--r-- |
| indvdum@39 | 1 |
package ru.bosony.solvers; |
| indvdum@39 | 2 |
|
| indvdum@39 | 3 |
import ru.bosony.model.mine.Mine; |
| indvdum@39 | 4 |
|
| indvdum@39 | 5 |
/** |
| indvdum@39 | 6 |
* @author indvdum (gotoindvdum[at]gmail[dot]com) <br> |
| indvdum@39 | 7 |
* 16.07.2012 4:31:43 |
| indvdum@39 | 8 |
* |
| indvdum@39 | 9 |
*/ |
| indvdum@39 | 10 |
public class SimpleSolver extends AbstractSolver {
|
| indvdum@39 | 11 |
|
| indvdum@39 | 12 |
public SimpleSolver(Mine mine, SolverListener listener) {
|
| indvdum@39 | 13 |
super(mine, listener); |
| indvdum@39 | 14 |
} |
| indvdum@39 | 15 |
|
| indvdum@39 | 16 |
@Override |
| indvdum@39 | 17 |
protected void solve() {
|
| indvdum@39 | 18 |
String route = ""; |
| indvdum@39 | 19 |
while (true) {
|
| indvdum@39 | 20 |
try {
|
| indvdum@39 | 21 |
Thread.sleep(1000); |
| indvdum@39 | 22 |
} catch (InterruptedException e) {
|
| indvdum@39 | 23 |
// TODO Auto-generated catch block |
| indvdum@39 | 24 |
e.printStackTrace(); |
| indvdum@39 | 25 |
} |
| indvdum@39 | 26 |
route += "A"; |
| indvdum@39 | 27 |
listener.foundNextRoute(route); |
| indvdum@39 | 28 |
} |
| indvdum@39 | 29 |
} |
| indvdum@39 | 30 |
|
| indvdum@39 | 31 |
} |