Updated 'Piece' class.

Updated the 'Piece' class by overwriting the 'toString' method in it.
This commit is contained in:
Daniel Grigencha
2024-12-06 00:45:56 +01:00
parent 50f9c0ef0c
commit d07eee6251

View File

@@ -121,4 +121,14 @@ public Color getColor() {
public UUID getUuid() {
return uuid;
}
/**
* This method will return all necessary information of Piece class in a more readable way.
*
* @return information as a String.
*/
@Override
public String toString() {
return "Piece with UUID: %s and color: %s with state: %s".formatted(this.uuid, color, state);
}
}