Skip to content

Dudoleitor/IS23-AM09

Repository files navigation

Software Engineering project - a.y. 2022-23

Box image

Project task

Implementation of My Shelfie, a board game created by Cranio Creations (Rulebook).

The project task is to implement in Java a distributed system composed of a single server and multiple clients (one per player) that simulates the board game My Shelfie.
Clients can interact with the server both via CLI and GUI, JavaFX is used for the latter. The network layer is implemented both using sockets and Java RMI.

Documentation and tests coverage

Inside the deliverables folder there are UML diagrams and pdf documents to show the structure of the code and explain each design choice. Classes, interfaces and methods are well described using javadoc. Each aspect of the software was tested using the framework JUnit, the test coverage report is also provided.

Implemented features

Feature Status Description
Complete game 🟢
RMI 🟢 Network layer using RMI
Socket 🟢 Network layer using sockets
CLI 🟢 Command line interface, on clients
GUI 🟢 JavaFX on clients
Multiple matches 🟢 The server supports multiple matches at the same time
Persistence 🟢 The status of each match is saved on the server and can be restored
Disconnection handling 🟢 If a client crashes, the match continues skipping its turns; clients can reconnect
Chat 🟢 Messages between players during the match

How to run

Download the jar archive AM09-MyShelfie from assets related to the latest release, you need to have java 11 installed (or newer). The application has to be started in a terminal with the following command, an interactive cli menu will guide you through the configuration process:

java -jar AM09-MyShelfie.jar

If you prefer to specify (some or all) options as command line arguments, you can use the following syntax.

To start the server:

java -jar AM09-MyShelfie.jar --server --ip <server_ip> --tcp <socket_port> --rmi <rmi_port>

To start the client:

java -jar AM09-MyShelfie.jar --client --ip <server_ip>

then you can choose between CLI and GUI with --cli and --gui options, between RMI and Socket with --rmi <port> and --tcp <port>.

Note about RMI interface selection, on client

RMI should be able to choose the correct network interface automatically with its relative IP, but if you encounter problems connecting to a server with an RMI client you can set the environment variable RMI_LOCAL_IP to the correct IP address. Use export RMI_LOCAL_IP=<ip_address> on Linux and MacOS, set RMI_LOCAL_IP=<ip_address> in a Windows cmd terminal, $env:RMI_LOCAL_IP = '<ip_address>' in PowerShell.

Note about game saves, on server

The server saves the status of each game running at the end of every turn, it uses a json file to store the information. The file is located and looked for in the current working directory, please be sure to start the server from a directory containing the files related to the games you intend to restore.

Team members

Copyright disclaimer

My Shelfie is property of Cranio Creations and all of the copyrighted graphical assets used in this project were supplied by Politecnico di Milano in collaboration with their rights' holders.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages