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
864ec864
Commit
864ec864
authored
Dec 01, 2018
by
hxw
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of 192.168.1.81:hxw2303632/webapp
parents
d70969e1
da3e3b60
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
GameEnv.java
src/GameEnvironment/GameEnv.java
+4
-0
PlaceLink.java
src/GameEnvironment/bean/PlaceLink.java
+4
-1
No files found.
src/GameEnvironment/GameEnv.java
View file @
864ec864
...
@@ -302,6 +302,7 @@ public class GameEnv implements Serializable{
...
@@ -302,6 +302,7 @@ public class GameEnv implements Serializable{
if
(
placeA
.
equals
(
placeB
))
{
if
(
placeA
.
equals
(
placeB
))
{
return
0
;
return
0
;
}
else
{
}
else
{
try
{
int
x
=
this
.
mapNames
.
get
(
placeA
);
int
x
=
this
.
mapNames
.
get
(
placeA
);
int
y
=
this
.
mapNames
.
get
(
placeB
);
int
y
=
this
.
mapNames
.
get
(
placeB
);
if
(
this
.
mapGraph
[
x
][
y
]
==
1
)
{
if
(
this
.
mapGraph
[
x
][
y
]
==
1
)
{
...
@@ -309,6 +310,9 @@ public class GameEnv implements Serializable{
...
@@ -309,6 +310,9 @@ public class GameEnv implements Serializable{
}
else
{
}
else
{
return
2
;
return
2
;
}
}
}
catch
(
Exception
e
)
{
return
-
1
;
}
}
}
}
}
// 两点之间的路径 // 使用广度优先算法单源最短路的SPFA算法的全称是:Shortest Path Faster Algorithm。
// 两点之间的路径 // 使用广度优先算法单源最短路的SPFA算法的全称是:Shortest Path Faster Algorithm。
...
...
src/GameEnvironment/bean/PlaceLink.java
View file @
864ec864
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
()
{
...
...
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