Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flooding-template
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
NGUYEN Thi hang
flooding-template
Commits
1e7af8c0
Commit
1e7af8c0
authored
2 years ago
by
NGUYEN Thi hang
Browse files
Options
Downloads
Patches
Plain Diff
fait à 2/11
parent
f1b2f519
No related branches found
No related tags found
No related merge requests found
Pipeline
#10570
failed
2 years ago
Stage: build
Stage: test
Stage: dast
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+1
-2
1 addition, 2 deletions
README.md
app/src/main/java/model/SquareCell.java
+16
-1
16 additions, 1 deletion
app/src/main/java/model/SquareCell.java
with
17 additions
and
3 deletions
README.md
+
1
−
2
View file @
1e7af8c0
...
@@ -6,5 +6,4 @@ Il s'agit d'implémenter une version du jeu "inondation" (voir par exemple [ici]
...
@@ -6,5 +6,4 @@ Il s'agit d'implémenter une version du jeu "inondation" (voir par exemple [ici]
## Membre du projet
## Membre du projet
-
NOM, prénom
-
Nguyen thi hang groupe 3
-
NOM, prénom
This diff is collapsed.
Click to expand it.
app/src/main/java/model/SquareCell.java
+
16
−
1
View file @
1e7af8c0
...
@@ -9,6 +9,18 @@ public class SquareCell extends AbstractCell{
...
@@ -9,6 +9,18 @@ public class SquareCell extends AbstractCell{
List
<
Cell
>
neighbours
;
List
<
Cell
>
neighbours
;
public
SquareCell
(){
Cell
DEFAULT_CELL_COLOR
;
}
public
SquareCell
(
Color
color
){
this
.
setColor
(
color
);
}
public
SquareCell
(
Color
color
,
List
<
Cell
>
neighbours
){
this
.
setColor
(
color
);
this
.
neighbours
=
neighbours
;
}
/**
/**
* A cell is placed somewhere on a grid. Its neighbours thus depend on the underlying grid.
* A cell is placed somewhere on a grid. Its neighbours thus depend on the underlying grid.
...
@@ -17,7 +29,7 @@ public class SquareCell extends AbstractCell{
...
@@ -17,7 +29,7 @@ public class SquareCell extends AbstractCell{
*/
*/
@Override
@Override
public
List
<
Cell
>
getNeighbours
()
{
public
List
<
Cell
>
getNeighbours
()
{
return
null
;
return
this
.
neighbours
;
}
}
/**
/**
...
@@ -28,6 +40,9 @@ public class SquareCell extends AbstractCell{
...
@@ -28,6 +40,9 @@ public class SquareCell extends AbstractCell{
*/
*/
@Override
@Override
public
void
setNeighbours
(
List
<
Cell
>
cells
)
{
public
void
setNeighbours
(
List
<
Cell
>
cells
)
{
this
.
neighbours
=
cells
;
}
}
...
...
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