Updated 'Piece' class.
Updated the 'Piece' class by overwriting the 'toString' method in it.
This commit is contained in:
@@ -121,4 +121,14 @@ public Color getColor() {
|
|||||||
public UUID getUuid() {
|
public UUID getUuid() {
|
||||||
return uuid;
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user