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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user