Coder Social home page Coder Social logo

is23-am09's Introduction

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.

is23-am09's People

Contributors

dudoleitor avatar giacomo-brunetta avatar mik-ado avatar cantonettigianluca27 avatar

Stargazers

 avatar Stefano Fossati avatar

Watchers

 avatar  avatar

is23-am09's Issues

No login check is perfomed

If a new client joins the server with the name of a player already playing, the server allows the login and treats the second client as the same player.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.