Progetto Ingegneria del Software 2024
Codex Naturalis is the final test of "Software Engineering", course of "Computer Science Engineering"
held at Politecnico di Milano (2023/2024).
Professor: Gianpaolo Cugola
Group: GC-29
The team:
- Schifone Gianmarco
- Viani Alessia Beatrice
- Vicentini Leonardo
- Zhang Andrea
The project consists of a Java version of the board game Codex Naturalis.
The project includes:
- High level UML Class Diagram;
- Complete UML Class Diagram;
- UML documentation of the communication protocol between client and server;
- Peer Reviews of model and network of group GC-39;
- Source code of the game implementation;
- Source code of junit tests;
- Compiled JAR file;
Almost all model and controller classes have a class and method coverage of 100%.
Coverage: code lines covered.
| Package | Class | Coverage |
|---|---|---|
| Model | Entire Package | 96% (1095/1133) |
| Controller | ServerImpl | 86% (155/180) |
| Controller | GameControllerImpl | 89% (235/263) |
We have implemented, in addiction to the game-specific and game-agnostic requirements, the following requirements:
- Complete rules
- TUI
- GUI
- RMI
- Socket
- 3 Advanced Features
| Feature | Implemented |
|---|---|
| Multiple games | ✔️ |
| Persistence | ❌ |
| Resilience to disconnections | ✔️ |
| Chat | ✔️ |
Follow these instructions to install and run the project.
- Download the JAR files.
To play locally, follow these steps:
Start the server on your PC using the following command:
java -jar server.jarIn case of
Error: Invalid or corrupt jarfile server.jarwe suggest to clone the repository instead of downloading the .zip file.
-
Set the code page to UTF-8:
chcp 65001
-
Start the client:
- RMI Client:
java -jar client.jar RMI localhost
- Socket Client:
java -jar client.jar socket localhost
- RMI Client:
-
RMI Client:
java -jar client.jar RMI localhost
-
Socket Client:
java -jar client.jar socket localhost
To play in a LAN environment, follow these steps:
Ensure all PCs are connected to the same local area network (LAN).
You will need the server's IP address. Use the appropriate command for your operating system:
Find the Server's IP Address
ipconfig-
Find the Server's IP Address
ifconfig
If your clients are using RMI, follow these additional steps:
-
Open /etc/hosts.allow and at the end of the file add:
ALL
-
Open /etc/hosts and modify all
127.0.1.1to127.0.0.1
Find the Server's IP Address
ifconfigjava -jar server.jar -Djava.rmi.server.hostname=<server-ip-address>Replace <server-ip-address> with the IP address obtained in Step 2.
Do not use
localhostinstead of<server-ip-address>
In case of
Error: Invalid or corrupt jarfile server.jarwe suggest to clone the repository instead of downloading the .zip file.
-
Set the code page to UTF-8:
chcp 65001
-
Start the client:
- RMI Client:
java -jar client.jar RMI <server-ip-address>
- Socket Client:
java -jar client.jar socket <server-ip-address>
Replace
<server-ip-address>with the IP address obtained in Step 2. - RMI Client:
-
RMI Client:
java -jar client.jar RMI <server-ip-address>
-
Socket Client:
java -jar client.jar socket <server-ip-address>
Replace <server-ip-address> with the IP address obtained in Step 2.
NOTA: Codex Naturalis è un gioco da tavolo sviluppato ed edito da Cranio Creations Srl. I contenuti grafici di questo progetto riconducibili al prodotto editoriale da tavolo sono utilizzati previa approvazione di Cranio Creations Srl a solo scopo didattico. È vietata la distribuzione, la copia o la riproduzione dei contenuti e immagini in qualsiasi forma al di fuori del progetto, così come la redistribuzione e la pubblicazione dei contenuti e immagini a fini diversi da quello sopracitato. È inoltre vietato l'utilizzo commerciale di suddetti contenuti.
