Commit 864ec864 by hxw

Merge branch 'master' of 192.168.1.81:hxw2303632/webapp

parents d70969e1 da3e3b60
...@@ -302,12 +302,16 @@ public class GameEnv implements Serializable{ ...@@ -302,12 +302,16 @@ public class GameEnv implements Serializable{
if(placeA.equals(placeB)) { if(placeA.equals(placeB)) {
return 0; return 0;
}else { }else {
int x = this.mapNames.get(placeA); try {
int y = this.mapNames.get(placeB); int x = this.mapNames.get(placeA);
if(this.mapGraph[x][y] == 1) { int y = this.mapNames.get(placeB);
return 1; if(this.mapGraph[x][y] == 1) {
}else { return 1;
return 2; }else {
return 2;
}
}catch(Exception e) {
return -1;
} }
} }
} }
......
package com.qiwu.chatbotbackend.GameEnvironment.bean; package com.qiwu.chatbotbackend.GameEnvironment.bean;
public class PlaceLink { import java.io.Serializable;
public class PlaceLink implements Serializable{
private static final long serialVersionUID = 1L;
private Integer index; private Integer index;
private PlaceLink placeLink; private PlaceLink placeLink;
public Integer getIndex() { public Integer getIndex() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment