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
SAIDI Hatim
flooding-template
Commits
a1929313
Commit
a1929313
authored
2 years ago
by
SAIDI Hatim
Browse files
Options
Downloads
Patches
Plain Diff
test
parent
6cab93ef
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/main/java/model/ArrayGrid.java
+7
-7
7 additions, 7 deletions
app/src/main/java/model/ArrayGrid.java
app/src/main/java/model/Grid.java
+1
-1
1 addition, 1 deletion
app/src/main/java/model/Grid.java
with
8 additions
and
8 deletions
app/src/main/java/model/ArrayGrid.java
+
7
−
7
View file @
a1929313
package
model
;
import
java.util.Iterator
;
public
class
ArrayGrid
implements
Grid
{
private
Cell
[][]
cells
;
...
...
@@ -34,14 +36,12 @@ public class ArrayGrid implements Grid{
}
public
void
color
(
ColorGenerator
colorGenerator
){
for
(
int
j
=
0
;
j
<
this
.
numberOfColumns
;
j
++)
{
for
(
int
i
=
0
;
i
<
this
.
numberOfRows
;
i
++)
{
SquareCell
cell
=
new
SquareCell
();
cells
[
i
][
j
].
setColor
(
colorGenerator
.
nextColor
(
cell
));
}
}
for
(
Cell
cell
:
this
)
cell
.
setColor
(
colorGenerator
.
nextColor
(
new
SquareCell
()));
}
public
Iterator
<
Cell
>
iterator
(){
return
null
;
}
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/model/Grid.java
+
1
−
1
View file @
a1929313
package
model
;
public
interface
Grid
{
public
interface
Grid
extends
Iterable
<
Cell
>
{
/**
* Return the cell located at the given coordinates in the grid.
...
...
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