Merge branch 'master' of

https://gitarero.ecam.fr/valentine.giral/OOP_3B3_Project.git
This commit is contained in:
Lymeng LY 2025-05-09 10:45:11 +02:00
commit ea19ce0241
2 changed files with 56 additions and 0 deletions

34
Test.board Normal file
View File

@ -0,0 +1,34 @@
8,white
8,8
Rook,0,0,B
Knight,1,0,B
Bishop,2,0,B
Queen,3,0,B
King,4,0,B
Bishop,5,0,B
Knight,6,0,B
Rook,7,0,B
Pawn,0,1,B
Pawn,1,1,B
Pawn,2,1,B
Pawn,4,1,B
Pawn,5,1,B
Pawn,6,2,B
Pawn,7,2,B
Pawn,3,3,B
Pawn,3,4,W
Pawn,7,5,W
Pawn,0,6,W
Pawn,1,6,W
Pawn,2,6,W
Pawn,4,6,W
Pawn,5,6,W
Pawn,6,6,W
Rook,7,6,W
Rook,0,7,W
Knight,1,7,W
Bishop,2,7,W
Queen,3,7,W
King,4,7,W
Bishop,5,7,W
Knight,6,7,W

View File

@ -0,0 +1,22 @@
package backend;
public class MoveRecord {
Piece movedPiece;
Piece capturedPiece;
int fromX, fromY, toX, toY;
int turnNumberAtMove;
boolean turnWhiteAtMove;
public MoveRecord(Piece moved, Piece captured, int fx, int fy, int tx, int ty,
int turnNum, boolean whiteTurn) {
this.movedPiece = moved;
this.capturedPiece = captured;
this.fromX = fx;
this.fromY = fy;
this.toX = tx;
this.toY = ty;
this.turnNumberAtMove = turnNum;
this.turnWhiteAtMove = whiteTurn;
}
}