Fix: ClientContrioller JavaDOC more fluid

This commit is contained in:
2026-05-02 17:19:16 +02:00
parent e2c48ae59d
commit b8c6c86d92
@@ -24,8 +24,9 @@ public class ClientController {
/**
* Constructor of the class. Initializes all attributes.
* @param view The client view to set (either TUI or GUI).
* Constructs the ClientController.
* Initializes all attributes.
* @param view the client view (either TUI or GUI)
*/
public ClientController(IView view) {
this.view = view;
@@ -35,8 +36,8 @@ public class ClientController {
/**
* Method to set the network client.
* @param client The client to sei (either TCP or RMI)
* Sets the network client.
* @param client the client to set (either TCP or RMI)
*/
public void setClient(IClient client) {
this.client = client;
@@ -44,8 +45,8 @@ public class ClientController {
/**
* Method to set the model in the Game Controller and in the view.
* @param model The model to set
* Sets the model in the GameController and updates the view.
* @param model the model to set
*/
public void setModel(Game model) {
localController.setModel(model);
@@ -54,8 +55,8 @@ public class ClientController {
/**
* Method to show an error in the view.
* @param message The error message to show in the view
* Displays an error message in the view.
* @param message the error message to display
*/
public void onError(String message) {
view.showError(message);
@@ -63,10 +64,10 @@ public class ClientController {
/**
* Used to draw a tribe card from the upper list.
* Create a NetworkEvent and then sends it through the network client.
* @param playerUsername The name of the player who requested to perform the action
* @param pos Index of the card to draw
* Requests to draw a tribe card from the upper list.
* Creates a NetworkEvent and sends it through the network client.
* @param playerUsername the name of the player performing the action
* @param pos the index of the card to draw
*/
public void drawUpperTribeCard(String playerUsername, int pos) {
client.doEvent(new DrawUpperTribeCard(playerUsername,pos));
@@ -74,30 +75,32 @@ public class ClientController {
/**
* Used to draw a tribe card from the lower list.
* Create a NetworkEvent and then sends it through the network client.
* @param playerUsername The name of the player who requested to perform the action
* @param pos Index of the card to draw
* Requests to draw a tribe card from the lower list.
* Creates a NetworkEvent and sends it through the network client.
* @param playerUsername the name of the player performing the action
* @param pos the index of the card to draw
*/
public void drawLowerTribeCard(String playerUsername,int pos) {
client.doEvent(new DrawLowerTribeCard(playerUsername,pos));
}
/**
* Used to draw a building card from the upper list.
* Create a NetworkEvent and then sends it through the network client.
* @param playerUsername The name of the player who requested to perform the action
* @param pos Index of the card to draw
* Requests to draw a building card from the upper list.
* Creates a NetworkEvent and sends it through the network client.
* @param playerUsername the name of the player performing the action
* @param pos the index of the card to draw
*/
public void drawUpperBuildingCard(String playerUsername,int pos) {
client.doEvent(new DrawUpperBuildingCard(playerUsername,pos));
}
/**
* Used to draw a building card from the lower list.
* Create a NetworkEvent and then sends it through the network client.
* @param playerUsername The name of the player who requested to perform the action
* @param pos Index of the card to draw
* Requests to draw a building card from the lower list.
* Creates a NetworkEvent and sends it through the network client.
* @param playerUsername the name of the player performing the action
* @param pos the index of the card to draw
*/
public void drawLowerBuildingCard(String playerUsername,int pos) {
client.doEvent(new DrawLowerBuildingCard(playerUsername,pos));
@@ -105,9 +108,9 @@ public class ClientController {
/**
* Used to skip the drawing action from the upper list.
* Available only when the upper list is empty (or the player can't draw any card).
* @param playerUsername The name of the player who requested to perform the action
* Requests to skip drawing from the upper list.
* This action is available only when the upper list is empty or the player cannot draw any card.
* @param playerUsername the name of the player performing the action
*/
public void skipUpper(String playerUsername) {
client.doEvent(new SkipUpper(playerUsername));
@@ -115,9 +118,9 @@ public class ClientController {
/**
* Used to skip the drawing action from the lower list.
* Available only when the lower list is empty (or the player can't draw any card).
* @param playerUsername The name of the player who requested to perform the action
* Requests to skip drawing from the lower list.
* This action is available only when the lower list is empty or the player cannot draw any card.
* @param playerUsername the name of the player performing the action
*/
public void skipLower(String playerUsername) { client.doEvent(new SkipLower(playerUsername));}
@@ -125,8 +128,8 @@ public class ClientController {
/**
* Used to draw a tribe card from the upper list.
* Available only if the player owns the building 12.
* @param playerUsername The name of the player who requested to perform the action
* @param pos Index of the card to draw
* @param playerUsername the name of the player performing the action
* @param pos the index of the card to draw
*/
public void pickOptionalTribeCard(String playerUsername,int pos) {
client.doEvent(new PickOptionalTribeCard(playerUsername,pos));
@@ -136,17 +139,18 @@ public class ClientController {
/**
* Used to draw a building card from the upper list.
* Available only if the player owns the building 12.
* @param playerUsername The name of the player who requested to perform the action
* @param pos Index of the card to draw
* @param playerUsername the name of the player performing the action
* @param pos the index of the card to draw
*/
public void pickOptionalBuildingCard(String playerUsername,int pos) {
client.doEvent(new PickOptionalBuildingCard(playerUsername,pos));
}
/**
* Used to skip the action of drawing a card from the upper list.
* Available only if the player owns the building 12.
* @param playerUsername The name of the player who requested to perform the action
* @param playerUsername the name of the player performing the action
*/
public void noOptionalCard(String playerUsername) {
client.doEvent(new NoOptionalCard(playerUsername));
@@ -154,9 +158,9 @@ public class ClientController {
/**
* Used to sperform the slot choiche action for the specified player at the specified position.
* @param playerUsername The name of the player who requested to perform the action
* @param pos Index of the selected slot
* Used to perform the slot choice action for the specified player at the specified position.
* @param playerUsername the name of the player performing the action
* @param pos the index of the selected slot
*/
public void slotChoice(String playerUsername,int pos) {
client.doEvent(new SlotChoice(playerUsername,pos));