-
10536115 Daniele Chiappalupi (@daniCh8)
[email protected] -
10520490 Stefano Formicola (@ste7en)
[email protected] -
10583425 Elena Iannucci (@eleiannu)
[email protected]
Functionality | State |
---|---|
Basic rules | โ |
Complete rules | โ |
Socket | โ |
RMI | โ |
GUI | โ |
CLI | โ |
Multiple games | โ |
Persistence | โ |
Domination or Towers modes | โ |
Terminator | โ |
From the directory deliverables/JARS, you can run the application server with the command-line command
java -jar Server-AM19.jar [--socket=<socket-port-number>]
[--rmi=<rmi-port-number>]
[--waiting-room-timeout=<waiting-room-timeout-in-seconds>]
[--operation-timeout=<operation-timeout-in-seconds>]
If a configuration.json
file exists in the same directory, CLI arguments will be overridden and the file will be used to setup the server.
The structure of the JSON configuration file is as the following example:
{
"socketPortNumber" : 3334,
"rmiPortNumber" : 4444,
"waitingRoomTimeout" : 30,
"operationTimeout" : 60
}
This is also the config file that will be used in case no arguments (or less then expected) will be passed to the program.
The server can handle multiple games. In order to start more than one game, more than five users are needed to login and every waitingRoomTimeout
seconds a new game is started.
At the end of every turn the server saves its state in Adrenaline_saved_state.bin
and, if this file exists, the server will ask if a previous state has to be loaded or not.
Otherwise, the command --run-saved-state
will restore the server regardless of the other parameters.
From the same directory of the server, you can run the CLI version of the client with the command-line command
java -jar Adrenaline-CLI-AM19.jar [ < --socket | --rmi >
< serverAddress>
< serverPort> ]
If no arguments are provided, at the startup a command-line prompt will ask the user for the connection type, server IP address and server port.
From the same directory of the server, you can run the GUI version of the client with the command-line command
java --module-path ./lib --add-modules javafx.controls -jar Adrenaline-GUI-AM19.jar
but JavaFX library folder is required in the same directory. Otherwise you can specify an absolute path to the --module-path
argument instead of ./lib
.