Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qwgame
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵国君
qwgame
Commits
2f713101
Commit
2f713101
authored
Nov 28, 2018
by
李进峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
is neighbour api update
parent
f9a3e967
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
GameEnv.java
src/GameEnvironment/GameEnv.java
+6
-3
No files found.
src/GameEnvironment/GameEnv.java
View file @
2f713101
...
@@ -306,10 +306,8 @@ public class GameEnv implements Serializable{
...
@@ -306,10 +306,8 @@ public class GameEnv implements Serializable{
int
y
=
this
.
mapNames
.
get
(
placeB
);
int
y
=
this
.
mapNames
.
get
(
placeB
);
if
(
this
.
mapGraph
[
x
][
y
]
==
1
)
{
if
(
this
.
mapGraph
[
x
][
y
]
==
1
)
{
return
1
;
return
1
;
}
else
if
(
this
.
getAllPath
(
placeA
,
placeB
).
size
()>
1
)
{
return
2
;
}
else
{
}
else
{
return
3
;
return
2
;
}
}
}
}
}
}
...
@@ -357,12 +355,17 @@ public class GameEnv implements Serializable{
...
@@ -357,12 +355,17 @@ public class GameEnv implements Serializable{
public
List
<
String
>
queryPathBySite
(
String
placeA
,
String
placeB
){
public
List
<
String
>
queryPathBySite
(
String
placeA
,
String
placeB
){
List
<
String
>
paths
=
this
.
getAllPath
(
placeA
,
placeB
);
List
<
String
>
paths
=
this
.
getAllPath
(
placeA
,
placeB
);
List
<
String
>
path
=
new
ArrayList
<
String
>();
List
<
String
>
path
=
new
ArrayList
<
String
>();
if
(
paths
.
size
()>
1
)
{
for
(
int
i
=
0
;
i
<
paths
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
paths
.
size
();
i
++)
{
if
(
i
!=
0
&&
i
!=(
paths
.
size
()-
1
))
{
if
(
i
!=
0
&&
i
!=(
paths
.
size
()-
1
))
{
path
.
add
(
paths
.
get
(
i
));
path
.
add
(
paths
.
get
(
i
));
}
}
}
}
return
path
;
return
path
;
}
else
{
return
null
;
}
}
}
/******************************************通过npc获取物品列表**********************************************/
/******************************************通过npc获取物品列表**********************************************/
// 通过npcName获取所有物品名称列表
// 通过npcName获取所有物品名称列表
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment