Class RMIClient

java.lang.Object
it.polimi.ingsw.Client.RMIClient
All Implemented Interfaces:
RMIClientInterface

public class RMIClient extends Object implements RMIClientInterface
RMI Client abstraction, attached to terminal and GUI views
Author:
Gruppo AM34
  • Field Details

  • Constructor Details

    • RMIClient

      public RMIClient(String[] args)
      RMI Client declaration
      Parameters:
      args - default arguments array
  • Method Details

    • main

      public static void main(String[] args)
      Main method, welcoming Client
      Parameters:
      args - default arguments array
    • evolve

      public boolean evolve()
      Client's evolution implementation
      Specified by:
      evolve in interface RMIClientInterface
      Returns:
      desire to continue login (otherwise ignored)
    • login

      private boolean login() throws RemoteException
      Login strategy
      Returns:
      conventionally, true if client's intention is to continue login actions, false otherwise
      Throws:
      RemoteException - Related to RMI
    • formulateMove

      private boolean formulateMove() throws Exception
      Move creation phase, updated effective Model
      Returns:
      true (ignored)
      Throws:
      RemoteException - related to RMI
      Exception
    • notYourTurn

      private boolean notYourTurn() throws Exception
      Throws:
      Exception
    • forcedGameEnd

      private boolean forcedGameEnd()
      Notifies players of a forced game end, related to a client unexpected disconnection
      Returns:
      true (ignored)
    • lastTurn

      private boolean lastTurn()
      Notifies players of the last turn, related to a client unexpected disconnection
      Returns:
      true (ignored)
    • finalScoreBoard

      private boolean finalScoreBoard() throws RemoteException
      Shows game's Final Scoreboard
      Returns:
      true (ignored)
      Throws:
      RemoteException - related to RMI
    • achievementsUpdate

      private boolean achievementsUpdate() throws RemoteException
      Sends informative achievements update messages
      Returns:
      true (ignored)
      Throws:
      RemoteException - related to RMI