piecetype work

This commit is contained in:
hugomanipoud2 2025-05-09 09:19:34 +02:00
parent 4dc627050c
commit 242691796e
2 changed files with 8 additions and 5 deletions

View File

@ -6,7 +6,7 @@ public class Board {
private int column;
private int line;
//initiation of the board, creating an 8 * 8 grid
public Board(int colNum, int lineNum) {
this.column = colNum;
column = 8;

View File

@ -5,9 +5,9 @@ public class Piece {
private int x;
private int y;
public Piece(int x, int y) {
this.x = x;
this.y = y;
public Piece(int xCoord, int yCoord) {
this.x = xCoord;
this.y = yCoord;
}
public int getX() {
return x;
@ -17,7 +17,10 @@ public class Piece {
return y;
}
public PieceType getType() {
public PieceType getType(Piece selectedPiece) {
int x = selectedPiece.getX() ;
int y = selectedPiece.getY() ;
Piecetype selectedPiece = ;
return null;
}