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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OUALAN Yanis
FirefighterStarter
Commits
bbdf6418
Commit
bbdf6418
authored
4 months ago
by
Yanis OUALAN
Browse files
Options
Downloads
Patches
Plain Diff
Changement scenario virus
parent
e775a8fd
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#41629
passed
4 months ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/controller/Controller.java
+9
-8
9 additions, 8 deletions
src/main/java/controller/Controller.java
with
9 additions
and
8 deletions
src/main/java/controller/Controller.java
+
9
−
8
View file @
bbdf6418
...
...
@@ -36,6 +36,7 @@ import util.Position;
import
view.Grid
;
import
view.ViewElement
;
public
class
Controller
{
public
static
final
int
PERIOD_IN_MILLISECONDS
=
50
;
...
...
@@ -142,14 +143,14 @@ public class Controller {
grid
.
setDimensions
(
columnCount
,
rowCount
,
squareWidth
,
squareHeight
);
Map
<
EntityFactory
,
Integer
>
entityCounts
=
new
HashMap
<
EntityFactory
,
Integer
>();
/*
entityCounts.put((pos, b) -> new Fire(pos), initialFireCount);
entityCounts.put((pos, b) -> new FireFighter(pos,b), initialFirefighterCount);
entityCounts.put((pos, b) -> new MotorizedFireFighter(pos, b), initialMotorizedFirefightersCount);
entityCounts.put((pos, b) -> new Cloud(pos, b), initialcloudCount);
entityCounts.put((pos, b) -> new Mountain(pos), initialmountaincount);
entityCounts.put((pos, b) -> new Rockery(pos), 3);
*/
/*
entityCounts.put((pos, b) -> new Rock(pos), 10);
...
...
@@ -157,12 +158,12 @@ public class Controller {
entityCounts.put((pos, b) -> new Paper(pos), 10);
*/
/*
entityCounts.put((pos, b) -> new Patient(pos), 70);
entityCounts.put((pos, b) -> new Virus(pos), 6);
entityCounts.put((pos, b) -> new Doctor(pos), 3);
*/
Model
model
=
new
FireFighter
Scenario
(
columnCount
,
rowCount
,
entityCounts
);
entityCounts
.
put
((
pos
,
b
)
->
new
model
.
doctorviruspatient
.
Patient
(
pos
),
70
);
entityCounts
.
put
((
pos
,
b
)
->
new
model
.
doctorviruspatient
.
Virus
(
pos
),
6
);
entityCounts
.
put
((
pos
,
b
)
->
new
model
.
doctorviruspatient
.
Doctor
(
pos
),
3
);
Model
model
=
new
model
.
doctorviruspatient
.
DoctorVirusPatient
Scenario
(
columnCount
,
rowCount
,
entityCounts
);
this
.
setModel
(
model
);
repaintGrid
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment