java.lang.Object
it.polimi.ingsw.am13.ParametersServer
Class storing all the major parameters the server classes use, both for game and technical aspects.
The non-final values are parametric and could be chosen via command line, the value here are the default ones
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic boolean
Flag indication if a player who remained alone must be declared winner Debug purposes onlystatic boolean
If true (default) the requirements for gold cards are checked.static boolean
Flag indicating if the server must check the pings of the clients.static String
RMI name for bind of remote interfaceLobbyRMIIF
static int
Number of points that, when first reached by a player, triggers the final phasestatic int
RMI port numberstatic String
IP Addressed of the serverstatic Long
Constant storing the sleep time in ms of the threads managing connections (i.e.static int
Socket port numberstatic Long
Constant storing the timeout used to detect the disconnection of a client (in ms)static Long
How much time (in ms) the controller waits for a client to reconnect when only 1 player or fewer are connected -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
timeout
Constant storing the timeout used to detect the disconnection of a client (in ms) -
sleepTime
Constant storing the sleep time in ms of the threads managing connections (i.e. how often they repeat the checks) -
timeToWaitReconnection
How much time (in ms) the controller waits for a client to reconnect when only 1 player or fewer are connected -
alonePlayerWin
public static boolean alonePlayerWinFlag indication if a player who remained alone must be declared winner Debug purposes only -
checkPings
public static boolean checkPingsFlag indicating if the server must check the pings of the clients. Debug purposes only -
SERVER_IP
IP Addressed of the server -
SOCKET_PORT
public static int SOCKET_PORTSocket port number -
RMI_PORT
public static int RMI_PORTRMI port number -
LOBBY_RMI_NAME
RMI name for bind of remote interfaceLobbyRMIIF
-
POINTS_FOR_FINAL_PHASE
public static int POINTS_FOR_FINAL_PHASENumber of points that, when first reached by a player, triggers the final phase -
CHECK_REQUIREMENTS
public static boolean CHECK_REQUIREMENTSIf true (default) the requirements for gold cards are checked. Otherwise, the card can always be placed in field
-
-
Constructor Details
-
ParametersServer
public ParametersServer()
-