feat coordinate
All checks were successful
Linux arm64 / Build (push) Successful in 28s

This commit is contained in:
Janet-Doe
2025-01-21 16:59:50 +01:00
parent e5618b70c1
commit 277eb76e60
6 changed files with 133 additions and 3 deletions

View File

@@ -0,0 +1,33 @@
package sudoku;
public class Coordinate {
private int x;
private int y;
public Coordinate(int row, int col) {
this.x = row;
this.y = col;
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public int getY() {
return y;
}
public void setY(int y) {
this.y = y;
}
public int calculateIndex(int size) {
return this.y * size + this.x;
}
}