Skip to content

domenicoputignano/ing-sw-2021-Putignano-Rendina-Restelli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Masters of Renaissance logo

Masters of Renaissance

Final project of "Software Engineering" AY 2020-2021.

Professor: Prof. Gianpaolo Cugola

Group: GC15

Mark: 30 cum laude

Team Members:

Implemented features

Feature Status
Complete rules ✔️
Socket ✔️
CLI ✔️
GUI ✔️
Multiple matches ✔️
Disconnection resilience ✔️
Local game ✔️

Requirements

Build

You can skip this phase by running the JAR placed in /deliverables folder.

In order to build the JAR, you have to:

  1. Install Maven
  2. Clone this repository
  3. In the cloned folder, run:
mvn package
  1. The compiled artifact (MaestriDelRinascimento.jar) will be inside the target folder.

Run

Server

To run the server, type:

java -jar MaestriDelRinascimento.jar server

Server ready

Options

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

Client

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.

GUI 🎮

To run the GUI, type:

java -jar MaestriDelRinascimento.jar gui

gui_screen

CLI 👾

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

cli_screen_1 cli_screen_2

Options

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

Local game 💻

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

Test coverage details

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.

test_coverage

To run the tests, you can run this command:

mvn test

License

This project has been developed in collaboration with Cranio Creations under the supervision of Polytechnic of Milan.

Masters of Renaissance bottom logo