Software Engineering project 2019 - Collini, Pons, Colazzo
Gruppo: AM32
Group Members:
-
10533327 Collini Luca (@Lucaz97) - luca.collini@mail.polimi.it
-
10533390 Pons Davide (@DPons97) - davide.pons@mail.polimi.it
-
10557158 Colazzo Michele (@michelecolazzo01) - michele.colazzo@mail.polimi.it
Functionalities:
- Basic rules
- Complete rules
- Socket
- RMI
- GUI
- CLI
- Multiple games
Screenshots
Extracting jar and running it:
We are extracting only one jar from the Launcher class in the package launcher.
We are extracting it with the intellij tool from Project Structure -> Artifacts -> Add JAR from modules with dependencies.
The main class to set is it.polimi.ingsw.launcher.Launcher
META-INF/MANIFEST.MF needs to be placed in src\main\java\resources.
Then we build the .jar from Build -> Build artifacts
Ready-to-use JARs: We built ready-to-use jars for everyone to use if needed. They can be found inside jar/ folder.
As the naming convention says you have to use the right jar for your operating system:
- Adrenalina_W10.jar - For Windows operating systems
- Adrenalina_MacOS.jar - For MacOS systems
- Adrenalina_LINUX.jar - For Linux systems
As we only extract one jar, we added parameters in order to change the startup behaviour of the program.
If no parameters are passed it will start a gui launcher that lets the user select options from a form.
Parameters can be written in any order and the read ones are:
- -m (mode) followed by c for client or s for server
- -gui to load a graphical user interface
- -cli to load a command line interface (if both -cli and -gui are passed it will load only the gui)
- -p (port) in case of client or server, to specify server port
- -c (connection) in case of client, to specify connection type: followed by r for rmi or s for socket
- -n (nickname) in case of client, followed by a string to specify client nickname
for example:
- to start the gui launcher just double click on the jar or open a terminal, move into the jar directory, then:
java -jar "jarname.jar" -gui
-to start the cli launcher open a terminal, move into the jar directory, then:
java -jar "jarname.jar"
- to launch a server in the cli that listens on the port 12345, open a terminal, move into the jar directory, then:
java -jar "jarname.jar" -m s -p 12345
- to launch a socket client with gui named Bob, open a terminal, move into the jar folder, then:
java -jar "jarname.jar" -m c -n Bob -s <server_ip> -p <server_socket_port> -c s -gui
- to launch a cli rmi client named Lian, onep a temrinal, move into the jar folder, then:
java -jar "jarname.jar" -m c -s <server_ip> -n Lian -p <server_rmi_port> -cli -c r