Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FirefighterStarter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
COUETOUX Basile
FirefighterStarter
Merge requests
!2
Simple
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Simple
alaboure/firefighter-template:simple
into
main
Overview
1
Commits
17
Pipelines
1
Changes
2
Merged
COUETOUX Basile
requested to merge
alaboure/firefighter-template:simple
into
main
7 months ago
Overview
1
Commits
17
Pipelines
1
Changes
2
0
0
Merge request reports
Viewing commit
7aa7b495
Prev
Next
Show latest version
2 files
+
26
−
17
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
7aa7b495
minor renaming
· 7aa7b495
LABOUREL Arnaud
authored
1 year ago
src/main/java/model/FirefighterBoard.java
+
4
−
4
View file @ 7aa7b495
Edit in single-file editor
Open in Web IDE
Show full file
@@ -58,13 +58,13 @@ public class FirefighterBoard implements Board<List<ModelElement>> {
}
public
List
<
Position
>
updateToNextGeneration
()
{
List
<
Position
>
result
=
activ
ateFirefighters
();
result
.
addAll
(
activ
ateFires
());
List
<
Position
>
result
=
upd
ateFirefighters
();
result
.
addAll
(
upd
ateFires
());
step
++;
return
result
;
}
private
List
<
Position
>
activ
ateFires
()
{
private
List
<
Position
>
upd
ateFires
()
{
List
<
Position
>
result
=
new
ArrayList
<>();
if
(
step
%
2
==
0
)
{
List
<
Position
>
newFirePositions
=
new
ArrayList
<>();
@@ -83,7 +83,7 @@ public class FirefighterBoard implements Board<List<ModelElement>> {
return
step
;
}
private
List
<
Position
>
activ
ateFirefighters
()
{
private
List
<
Position
>
upd
ateFirefighters
()
{
List
<
Position
>
result
=
new
ArrayList
<>();
List
<
Position
>
firefighterNewPositions
=
new
ArrayList
<>();
for
(
Position
firefighterPosition
:
firefighterPositions
)
{
Loading