diff --git a/app/src/main/java/sudoku/structure/Coordinate.java b/app/src/main/java/sudoku/structure/Coordinate.java
index 40323f5..96e9af1 100644
--- a/app/src/main/java/sudoku/structure/Coordinate.java
+++ b/app/src/main/java/sudoku/structure/Coordinate.java
@@ -1,10 +1,12 @@
package sudoku.structure;
/**
- * Représente les coordonnées d'une Cell
+ * Représente les coordonnées d'une Cell.
*/
public class Coordinate {
+ //
+
/**
* L'abscisse de la Cell.
*/
@@ -14,6 +16,10 @@ public class Coordinate {
*/
private int y;
+ //
+
+ //
+
public Coordinate(int x, int y) {
this.x = x;
this.y = y;
@@ -35,16 +41,23 @@ public class Coordinate {
this.y = y;
}
- public int calculateIndex(int size) {
- return this.y * size + this.x;
- }
-
+ /**
+ * Ajoute la Coordiante donnée à celle-ci.
+ * @param other Coordiante, à ajouter.
+ * @return Coordinate, le résultat de l'addition.
+ */
public Coordinate add(Coordinate other) {
return new Coordinate(this.x + other.x, this.y + other.y);
}
+ /**
+ * Soustrait la Coordiante donnée à celle-ci.
+ * @param other Coordiante, à soustraire.
+ * @return Coordinate, le résultat de la soustraction.
+ */
public Coordinate sub(Coordinate other) {
return new Coordinate(this.x - other.x, this.y - other.y);
}
+ //
}