docs: refine JavaDoc for model, board and order classes

This commit is contained in:
MatteoPellegrino05
2026-05-20 17:42:42 +02:00
parent 78a3edddf9
commit b01ffd62b8
11 changed files with 63 additions and 45 deletions
@@ -60,8 +60,12 @@ public abstract class OrderLogicCard implements Serializable {
}
/**
* Adds the player to the end of the queue, without effects.
* Moves the specified player to the end of the queue without applying effects.
*
* <p>Any previous occurrence of the player is removed from both the queue
* and the order list before the player is added again.
*
* @param player the player to be pushed into the queue.
*/
@@ -75,6 +79,9 @@ public abstract class OrderLogicCard implements Serializable {
/**
* Removes and returns the first player in the queue.
*
* <p>The first order entry that has not yet been marked as played
* is marked as played before removing the player from the queue.
*
* @return the first player in the queue, or {@code null} if the queue is empty.
*/
public Player pull(){
@@ -121,10 +128,12 @@ public abstract class OrderLogicCard implements Serializable {
}
/**
* TODO rifare javadoc
* Returns the {@code Player}'s position based on it's {@code Username}.
* @param username The desired {@code Player}'s username.
* @return {@code int} - the {@code Player}'s position.
* Returns the position of the player associated with the specified username
* within the current order list.
*
* @param username the username of the player whose position is requested.
* @return the player's position, or {@code -1} if no player with the specified
* username is present in the order list.
* @see Player
*/
public int getPosition(String username)
@@ -139,4 +148,4 @@ public abstract class OrderLogicCard implements Serializable {
}
}
}