diff --git a/src/GameEnvironment/GameEnv.java b/src/GameEnvironment/GameEnv.java index 738a471..533c5e2 100644 --- a/src/GameEnvironment/GameEnv.java +++ b/src/GameEnvironment/GameEnv.java @@ -68,36 +68,43 @@ public class GameEnv implements Serializable{ int x = this.mapNames.get(placeMapTmp.get(tmp)); int y = this.mapNames.get(placeMapTmp.get(idName)); this.mapGraph[x][y] = 1; + // 有方向的添加 + // this.mapGraph[y][x] = 1; } placeIndex.get(placeMapTmp.get(tmp)).setAbleGo(ableGos); } + + // 映射index -> map name + this.mapIndexName = new String[mapGraph.length]; for(i=0; i map name - this.mapIndexName = new String[mapGraph.length]; + + System.out.println("\n"); + System.out.print("\t"); for(i=0; i queryCanGoBySite(String site){ List ableGoString = new ArrayList(); - Place place = this.placeIndex.get(site); - List ableGos = place.getAbleGo(); - for(int i=0; i