Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
vadere
vadere
Commits
bbbdf16e
Commit
bbbdf16e
authored
Sep 23, 2016
by
Jakob Schöttl
Browse files
Extract variable in target controller
parent
359c8742
Changes
1
Hide whitespace changes
Inline
Side-by-side
VadereSimulator/src/org/vadere/simulator/control/TargetController.java
View file @
bbbdf16e
...
...
@@ -144,14 +144,16 @@ public class TargetController {
if
(
target
.
isAbsorbing
())
{
topography
.
removeElement
(
agent
);
}
else
{
final
int
nextTargetListIndex
=
agent
.
getNextTargetListIndex
();
// Deprecated target list usage
if
(
agent
.
getN
extTargetListIndex
()
==
-
1
&&
!
agent
.
getTargets
().
isEmpty
())
{
if
(
n
extTargetListIndex
==
-
1
&&
!
agent
.
getTargets
().
isEmpty
())
{
agent
.
getTargets
().
removeFirst
();
}
// The right way (later this first check should not be necessary anymore):
if
(
agent
.
getN
extTargetListIndex
()
!=
-
1
)
{
if
(
agent
.
getN
extTargetListIndex
()
<
agent
.
getTargets
().
size
())
{
if
(
n
extTargetListIndex
!=
-
1
)
{
if
(
n
extTargetListIndex
<
agent
.
getTargets
().
size
())
{
agent
.
incrementNextTargetListIndex
();
}
}
...
...
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