Updated 'PlayerData' class.

Updated the 'PlayerData' class by adding the 'isFinished' method to it. In Addition, the empty constructor was optimized to initalize all class attributes for serializable cases.
This commit is contained in:
Daniel Grigencha
2024-12-02 16:29:32 +01:00
parent 167d898a3c
commit 1bcb73cff7

View File

@@ -43,10 +43,23 @@ public PlayerData(Color color) {
}
}
/**
* Constructor.
*/
private PlayerData() {
homeNodes = null;
waitingArea = null;
pieces = null;
homeNodes = new HomeNode[4];
waitingArea = new Piece[4];
pieces = new Piece[4];
}
/**
* This method will be used to check if the player is finished.
* ToDo: Currently return always false. Implement logic!
*
* @return true or false.
*/
public boolean isFinished() {
return false;
}
/**