first .osm format import

- import osm convert it to Drawing and use it as resolved path.
- Not ready , first test over lab/valbonne_oct_2020.osm
This commit is contained in:
philippe lhardy
2020-10-31 15:44:23 +01:00
parent 99716e57d3
commit 8af19bdb59
12 changed files with 17220 additions and 503 deletions

View File

@@ -557,7 +557,7 @@ public class LabyModel implements WallsProvider {
/**
* One step in Maze generation process
* get last element in open list and explore one random direction with it.
* get last element in open list and explore one random free direction with it.
*
* @returns whether process closed current node.
**/
@@ -601,6 +601,7 @@ public class LabyModel implements WallsProvider {
}
if ((newx >= 0) && (newy >= 0) && (newx < width) && (newy < height)) {
// CLEAR is 0 : no tag at all.
if ((t[newx][newy]) == CLEAR) {
freeDirection.add(Short.valueOf(direction));
}
@@ -610,6 +611,7 @@ public class LabyModel implements WallsProvider {
if (!freeDirection.isEmpty()) {
// control random using our own pseudorandom
short direction = 0;
// System.out.println("" + freeDirection.size() + "\n" );
if (freeDirection.size() > 1) {
direction = freeDirection.get(random.nextInt(freeDirection.size()));
} else {