Final project of "Software Engineering" AY 2020-2021.
Professor: Prof. Gianpaolo Cugola
Group: GC15
Mark: 30 cum laude
Feature | Status |
---|---|
Complete rules | ✔️ |
Socket | ✔️ |
CLI | ✔️ |
GUI | ✔️ |
Multiple matches | ✔️ |
Disconnection resilience | ✔️ |
Local game | ✔️ |
You can skip this phase by running the JAR placed in /deliverables
folder.
In order to build the JAR, you have to:
- Install Maven
- Clone this repository
- In the cloned folder, run:
mvn package
- The compiled artifact (
MaestriDelRinascimento.jar
) will be inside thetarget
folder.
To run the server, type:
java -jar MaestriDelRinascimento.jar server
If you want to edit some options, you can write them at the end of the previous command. The options available for the server are listed below.
java -jar MaestriDelRinascimento.jar server -port:Y
Option | Description | Default value |
---|---|---|
-port: |
The port the server is listening on. | 1234 |
The game can be played with a GUI or through a CLI, you can choose what best fits your taste!
Furthermore you can play in solo mode on your local machine without connecting to the server.
To run the GUI, type:
java -jar MaestriDelRinascimento.jar gui
First of all, if you are on Windows, run this command to allow the game to use ANSI codes to show its colorful CLI interface:
REG ADD HKCU\CONSOLE /f /v VirtualTerminalLevel /t REG_DWORD /d 1
Then to run the CLI, type:
java -jar MaestriDelRinascimento.jar cli
If you want to edit some options, you can write them at the end of the previous commands. The options available for the client are listed below.
java -jar MaestriDelRinascimento.jar gui/cli -ip:X.X.X.X -port:Y
Option | Description | Default value |
---|---|---|
-ip: |
The ip of the server the client has to connect to | 127.0.0.1 |
-port: |
The port the server is listening on. | 1234 |
To start a solo mode game without connecting to the server, type:
java -jar MaestriDelRinascimento.jar local
By default, the client is started with GUI. To play with CLI, type:
java -jar MaestriDelRinascimento.jar local cli
Unit tests have been performed mainly on Model and Controller components, since Client and Network would
have been difficult to test through the technologies used. Testing tools mainly used in this project are
JUnit and Mockito.
The coverage results achieved for Model and Controller packages are shown below.
mvn test
This project has been developed in collaboration with Cranio Creations under the supervision of Polytechnic of Milan.