Coverage Summary for Class: IClient (it.polimi.ingsw.gc14.Network)

Class
IClient


 package it.polimi.ingsw.gc14.Network;
 
 import it.polimi.ingsw.gc14.ErrorType;
 
 /**
  * Defines the operations that a client can request during the game.
  */
 public interface IClient {
 
     /**
      * Connects the client to the server using the specified username
      * and preferred connection type.
      *
      * @param username the username chosen by the player.
      * @param proposedNPlayers the desired number of players proposed by this client.
      * @return {@code true} if the connection is established successfully,
      *         {@code false} otherwise.
      */
     ErrorType connect(String username, int proposedNPlayers);
 
     /**
      * Requests to draw a tribe card from the upper tribe card list.
      *
      * @param playerUsername the username of the player performing the action.
      * @param pos the position of the selected card in the upper tribe card list.
      */
     void drawUpperTribeCard(String playerUsername, int pos);
 
     /**
      * Requests to draw a tribe card from the lower tribe card list.
      *
      * @param playerUsername the username of the player performing the action.
      * @param pos the position of the selected card in the lower tribe card list.
      */
     void drawLowerTribeCard(String playerUsername, int pos);
 
     /**
      * Requests to draw a building card from the upper building card list.
      *
      * @param playerUsername the username of the player performing the action.
      * @param pos the position of the selected card in the upper building card list.
      */
     void drawUpperBuildingCard(String playerUsername, int pos);
 
     /**
      * Requests to draw a building card from the lower building card list.
      *
      * @param playerUsername the username of the player performing the action.
      * @param pos the position of the selected card in the lower building card list.
      */
     void drawLowerBuildingCard(String playerUsername, int pos);
 
     /**
      * Requests to skip the current player's optional action.
      *
      * @param playerUsername the username of the player skipping the action.
      */
     void skipTurn(String playerUsername);
 
     /**
      * Requests to assign the specified player to a slot.
      *
      * @param playerUsername the username of the player making the slot choice.
      * @param pos the position of the selected slot.
      */
     void slotChoice(String playerUsername, int pos);
 
     /**
      * Requests to assign the selected totem to the specified player.
      *
      * @param playerUsername the username of the player making the totem choice.
      * @param totem the name of the selected totem.
      */
     void totemChoice(String playerUsername, String totem);
 
     /** Notifies the server of a voluntary disconnection and closes the connection. */
     void notifyDisconnection();
 }