Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SAHIN Game of life 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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SAHIN Melis damla
SAHIN Game of life Template
Compare revisions
main to aefbcb2eb8b5c9b199db6351db9bdaad87a67789
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
s23026062/sahin-game-of-life-template
Select target project
No results found
aefbcb2eb8b5c9b199db6351db9bdaad87a67789
Select Git revision
Loading items
Swap
Target
saddem.r/game-of-life-template
Select target project
s20026898/tp-6
boukenze.b/jeu-de-la-vie-tp-3
b22015696/game-of-life-template
s23026062/sahin-game-of-life-template
m22023183/game-of-life-MALEK
z23012739/game-of-life-template
p23021107/poussardin-malo-game-of-life-template
o21225801/game-of-life-template
alaboure/game-fo-life-template
t22007439/game-of-life-toullec
b23021750/game-of-life
c22029830/game-of-life-template-rafi
b23025683/game-of-life-template-tp-6
gnaves/game-of-life-template
a22025223/game-of-life-template-cristel
f22024692/game-of-life-template-paolo-mathis-erwan
t21233923/game-fo-life-template
h21231335/game-fo-life-template
l22023519/game-of-life-template-salma
p23020787/game-of-life-template
b21232450/game-of-life-template
s22031458/game-of-life
n21223697/tp-4-ngom
a22027291/game-of-life-of-salim
k22029508/tp-4
s19033421/game-of-life-template
b21229750/jeu-de-la-vie-tp-3
saddem.r/game-of-life-template
l3_s3_infoamu/s3/programmation-2/game-fo-life-template
29 results
main
Select Git revision
Loading items
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (1)
Compléter la classe Coordinate
· aefbcb2e
SAHIN Melis damla
authored
7 months ago
aefbcb2e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+1
-1
1 addition, 1 deletion
README.md
src/main/java/matrix/Coordinate.java
+14
-16
14 additions, 16 deletions
src/main/java/matrix/Coordinate.java
with
15 additions
and
17 deletions
README.md
View file @
aefbcb2e
...
...
@@ -19,5 +19,5 @@ jeu de la vie.
## Membre du projet
-
NOM, prénom
, du participant
-
SAHIN, Melis Damla
, du participant
This diff is collapsed.
Click to expand it.
src/main/java/matrix/Coordinate.java
View file @
aefbcb2e
...
...
@@ -15,8 +15,7 @@ public record Coordinate(int x, int y) {
* @return A new {@link Coordinate} instance.
*/
public
static
Coordinate
of
(
int
x
,
int
y
)
{
// TODO: compléter ce fabriquant
return
null
;
return
new
Coordinate
(
x
,
y
);
}
/**
...
...
@@ -25,8 +24,7 @@ public record Coordinate(int x, int y) {
* @return The left adjacent {@link Coordinate}.
*/
public
Coordinate
left
()
{
// TODO: à compléter
return
null
;
return
new
Coordinate
(
x
-
1
,
y
);
}
/**
...
...
@@ -35,8 +33,7 @@ public record Coordinate(int x, int y) {
* @return The right adjacent {@link Coordinate}.
*/
public
Coordinate
right
()
{
// TODO: à compléter
return
null
;
return
new
Coordinate
(
x
+
1
,
y
);
}
/**
...
...
@@ -45,8 +42,7 @@ public record Coordinate(int x, int y) {
* @return The above adjacent {@link Coordinate}.
*/
public
Coordinate
above
()
{
// TODO: à compléter
return
null
;
return
new
Coordinate
(
x
,
y
+
1
);
}
/**
...
...
@@ -55,8 +51,7 @@ public record Coordinate(int x, int y) {
* @return The below adjacent {@link Coordinate}.
*/
public
Coordinate
below
()
{
// TODO: à compléter
return
null
;
return
new
Coordinate
(
x
,
y
-
1
);
}
/**
...
...
@@ -73,8 +68,7 @@ public record Coordinate(int x, int y) {
* @return A list of orthogonal neighboring {@link Coordinate}s.
*/
public
List
<
Coordinate
>
orthogonalNeighbours
()
{
// TODO: à compléter
return
List
.
of
();
return
List
.
of
(
left
(),
right
(),
above
(),
below
());
}
/**
...
...
@@ -92,8 +86,10 @@ public record Coordinate(int x, int y) {
* @return A list of diagonal neighboring {@link Coordinate}s.
*/
public
List
<
Coordinate
>
diagonalNeighbours
()
{
// TODO: à compléter
return
List
.
of
();
return
List
.
of
(
new
Coordinate
(
x
-
1
,
y
-
1
),
new
Coordinate
(
x
-
1
,
y
+
1
),
new
Coordinate
(
x
+
1
,
y
-
1
),
new
Coordinate
(
x
+
1
,
y
+
1
));
}
/**
...
...
@@ -111,8 +107,10 @@ public record Coordinate(int x, int y) {
* @return A list of all neighboring {@link Coordinate}s.
*/
public
List
<
Coordinate
>
orthodiagonalNeighbours
()
{
// TODO: à compléter
return
List
.
of
();
return
List
.
of
(
left
(),
right
(),
above
(),
below
(),
new
Coordinate
(
x
-
1
,
y
-
1
),
new
Coordinate
(
x
-
1
,
y
+
1
),
new
Coordinate
(
x
+
1
,
y
-
1
),
new
Coordinate
(
x
+
1
,
y
+
1
));
}
@Override
...
...
This diff is collapsed.
Click to expand it.