From cd24b5d2e97402d353951ec5ec964c0d9bbf7a0c Mon Sep 17 00:00:00 2001 From: Louanne Date: Fri, 9 May 2025 09:19:51 +0200 Subject: [PATCH] reorganization --- OOP_3B6_Project/src/Main.java | 3 --- OOP_3B6_Project/src/backend/Move.java | 28 -------------------- OOP_3B6_Project/src/backend/Piece.java | 36 -------------------------- 3 files changed, 67 deletions(-) diff --git a/OOP_3B6_Project/src/Main.java b/OOP_3B6_Project/src/Main.java index 870cae7..631f9bb 100644 --- a/OOP_3B6_Project/src/Main.java +++ b/OOP_3B6_Project/src/Main.java @@ -1,7 +1,4 @@ import backend.Board; -import backend.Move; -import backend.Piece; -import backend.PieceType; import windowInterface.MyInterface; diff --git a/OOP_3B6_Project/src/backend/Move.java b/OOP_3B6_Project/src/backend/Move.java index 3419161..e8dba7b 100644 --- a/OOP_3B6_Project/src/backend/Move.java +++ b/OOP_3B6_Project/src/backend/Move.java @@ -1,55 +1,27 @@ package backend; - - public class Move { - private int fromX, fromY; - private int toX, toY; - private boolean isWhite; - private PieceType type; - private Piece capturedPiece; - - - public Move(int fromX, int fromY, int toX, int toY, boolean isWhite, PieceType type, Piece capturedPiece) { this.fromX = fromX; - this.fromY = fromY; - this.toX = toX; - this.toY = toY; - this.isWhite = isWhite; - this.type = type; - this.capturedPiece = capturedPiece; - } - - - // Getters - public int getFromX() { return fromX; } - public int getFromY() { return fromY; } - public int getToX() { return toX; } - public int getToY() { return toY; } - public boolean isWhite() { return isWhite; } - public PieceType getType() { return type; } - public Piece getCapturedPiece() { return capturedPiece; } - } \ No newline at end of file diff --git a/OOP_3B6_Project/src/backend/Piece.java b/OOP_3B6_Project/src/backend/Piece.java index 978c561..0dde3f2 100644 --- a/OOP_3B6_Project/src/backend/Piece.java +++ b/OOP_3B6_Project/src/backend/Piece.java @@ -1,61 +1,25 @@ package backend; - - public class Piece { - - - - - private int x, y; - private boolean isWhite; - private PieceType type; - - - public Piece(int x, int y, boolean isWhite, PieceType type) { - this.x = x; - this.y = y; - this.isWhite = isWhite; - this.type = type; - } - - - public int getX() { - return x; - } - - - public int getY() { - return y; - } - public PieceType getType() { - return type; - } - - - public boolean isWhite() { - return isWhite; - } - }