Attributes class Move

This commit is contained in:
gabrielshiraishi 2025-04-17 10:33:02 +02:00
parent e6633701ff
commit 1a0faded2c
2 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,8 @@
package backend; package backend;
public class Move { public class Move {

View File

@ -1,7 +1,8 @@
package backend; package backend;
public class PieceCreation { public class PieceCreation {
public Piece createPiece(int x, int y, PieceType type, boolean isWhite) {
public static Piece createPiece(int x, int y, PieceType type, boolean isWhite) {
switch (type) { switch (type) {
case Pawn: return new Pawn(x, y, isWhite); case Pawn: return new Pawn(x, y, isWhite);
case Rook: return new Rook(x, y, isWhite); case Rook: return new Rook(x, y, isWhite);