New method getMoveListSize in ChessEngine
parent
572e7b1131
commit
3335dc75cf
|
@ -104,6 +104,8 @@ public class ChessEngine {
|
||||||
|
|
||||||
public int getCurrentMoveIndex() { return currentMoveIndex; }
|
public int getCurrentMoveIndex() { return currentMoveIndex; }
|
||||||
|
|
||||||
|
public int getMoveListSize() { return moves.size(); }
|
||||||
|
|
||||||
private PieceDTO convertPieceToDTO(Piece piece) {
|
private PieceDTO convertPieceToDTO(Piece piece) {
|
||||||
if (piece == null || piece.equals(Piece.NONE)) return null;
|
if (piece == null || piece.equals(Piece.NONE)) return null;
|
||||||
String color = piece.name().startsWith("WHITE") ? "WHITE" : "BLACK";
|
String color = piece.name().startsWith("WHITE") ? "WHITE" : "BLACK";
|
||||||
|
|
Loading…
Reference in New Issue