Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
autumn_rrs
autumn_agent_2023
Commits
48fe2072
Commit
48fe2072
authored
Nov 20, 2023
by
Ryosuke Suzuki
Browse files
Merge branch 'needRescue' into 'develop'
needRescue modify See merge request
!6
parents
cc741d52
1da7a58d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/autumn_2023/module/complex/CentralizedControlATHumanDetector.java
View file @
48fe2072
...
@@ -68,7 +68,7 @@ public class CentralizedControlATHumanDetector extends HumanDetector {
...
@@ -68,7 +68,7 @@ public class CentralizedControlATHumanDetector extends HumanDetector {
if
(!(
entity
instanceof
Civilian
))
continue
;
if
(!(
entity
instanceof
Civilian
))
continue
;
Civilian
civ
=
(
Civilian
)
entity
;
Civilian
civ
=
(
Civilian
)
entity
;
if
(!
this
.
isN
eedRescue
Human
(
civ
)){
if
(!
this
.
n
eedRescue
(
civ
)){
continue
;
continue
;
}
}
StandardMessagePriority
level
=
StandardMessagePriority
.
NORMAL
;
StandardMessagePriority
level
=
StandardMessagePriority
.
NORMAL
;
...
@@ -218,7 +218,7 @@ public class CentralizedControlATHumanDetector extends HumanDetector {
...
@@ -218,7 +218,7 @@ public class CentralizedControlATHumanDetector extends HumanDetector {
return
true
;
return
true
;
}
}
private
boolean
isN
eedRescue
Human
(
StandardEntity
entity
){
private
boolean
n
eedRescue
(
StandardEntity
entity
){
if
(
entity
==
null
)
if
(
entity
==
null
)
return
false
;
return
false
;
if
(!(
entity
instanceof
Human
))
if
(!(
entity
instanceof
Human
))
...
...
src/main/java/autumn_2023/module/complex/CentralizedControlFBAllocator.java
View file @
48fe2072
...
@@ -187,7 +187,7 @@ public class CentralizedControlFBAllocator extends FireTargetAllocator {
...
@@ -187,7 +187,7 @@ public class CentralizedControlFBAllocator extends FireTargetAllocator {
return
(
mesciv
);
return
(
mesciv
);
})
})
.
map
(
MessageCivilian:
:
getAgentID
)
.
map
(
MessageCivilian:
:
getAgentID
)
.
filter
(
e
->
this
.
isN
eedRescue
Human
(
this
.
worldInfo
.
getEntity
(
e
)))
.
filter
(
e
->
this
.
n
eedRescue
(
this
.
worldInfo
.
getEntity
(
e
)))
.
filter
(
e
->
!(
finishEntityIDs
.
contains
(
e
)))
.
filter
(
e
->
!(
finishEntityIDs
.
contains
(
e
)))
.
collect
(
Collectors
.
toSet
());
.
collect
(
Collectors
.
toSet
());
...
@@ -228,7 +228,7 @@ public class CentralizedControlFBAllocator extends FireTargetAllocator {
...
@@ -228,7 +228,7 @@ public class CentralizedControlFBAllocator extends FireTargetAllocator {
* @param entity エンティティ
* @param entity エンティティ
* @return true : 救助必要 false : 救助不必要
* @return true : 救助必要 false : 救助不必要
*/
*/
private
boolean
isN
eedRescue
Human
(
StandardEntity
entity
){
private
boolean
n
eedRescue
(
StandardEntity
entity
){
if
(
entity
==
null
)
if
(
entity
==
null
)
return
false
;
return
false
;
if
(!(
entity
instanceof
Human
))
if
(!(
entity
instanceof
Human
))
...
...
src/main/java/autumn_2023/module/complex/CentralizedControlFBHumanDetector.java
View file @
48fe2072
...
@@ -74,7 +74,7 @@ public class CentralizedControlFBHumanDetector extends HumanDetector {
...
@@ -74,7 +74,7 @@ public class CentralizedControlFBHumanDetector extends HumanDetector {
if
(!(
entity
instanceof
Civilian
))
continue
;
if
(!(
entity
instanceof
Civilian
))
continue
;
Civilian
civ
=
(
Civilian
)
entity
;
Civilian
civ
=
(
Civilian
)
entity
;
if
(!
this
.
isN
eedRescue
Human
(
civ
)){
if
(!
this
.
n
eedRescue
(
civ
)){
continue
;
continue
;
}
}
StandardMessagePriority
level
=
StandardMessagePriority
.
NORMAL
;
StandardMessagePriority
level
=
StandardMessagePriority
.
NORMAL
;
...
@@ -214,7 +214,7 @@ public class CentralizedControlFBHumanDetector extends HumanDetector {
...
@@ -214,7 +214,7 @@ public class CentralizedControlFBHumanDetector extends HumanDetector {
return
true
;
return
true
;
}
}
private
boolean
isN
eedRescue
Human
(
StandardEntity
entity
){
private
boolean
n
eedRescue
(
StandardEntity
entity
){
if
(
entity
==
null
)
if
(
entity
==
null
)
return
false
;
return
false
;
if
(!(
entity
instanceof
Human
))
if
(!(
entity
instanceof
Human
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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