New method getMoveListSize in ChessEngine

PGN
Justin 2025-06-22 01:32:23 +02:00
parent 572e7b1131
commit 3335dc75cf
1 changed files with 2 additions and 0 deletions

View File

@ -104,6 +104,8 @@ public class ChessEngine {
public int getCurrentMoveIndex() { return currentMoveIndex; }
public int getMoveListSize() { return moves.size(); }
private PieceDTO convertPieceToDTO(Piece piece) {
if (piece == null || piece.equals(Piece.NONE)) return null;
String color = piece.name().startsWith("WHITE") ? "WHITE" : "BLACK";