Giter VIP home page Giter VIP logo

masters-of-renaissance's Introduction

Masters of Renaissance

Digital version of the board game Masters of Renaissance, implemented in Java.

CI status GitHub release (latest by date)

Project

Final Project of Software Engineering, Polytechnic University of Milan, A.Y. 2020/2021. Prof. Alessandro Margara.

Grade: 30 with Honors.

Team AM49

Requirements

The project consists in developing a digital version of the board game Masters of Renaissance (Maestri del Rinascimento), using the Java programming language.

The game needs to be implemented as a distributed system, with a single server and multiple clients that connect to it.

The system must be based on the MVC architecture.

Implemented features

Feature Implemented
Complete game rules ✔️ 1+ players supported (see Configuration Files)
CLI-based client ✔️
GUI-based client ✔️
Communication protocol ("Socket") ✔️
Advanced functionality 1 ✔️ Multiple games
Advanced functionality 2 ✔️ Local game
Advanced functionality 3 ✔️ Resilience to disconnections

Screenshots

GUI

CLI

Compile

To compile the software:

  1. Install Java SE 16 (earlier versions will not work)
  2. Install Maven
  3. Clone this repository
  4. In the cloned repository folder, run: mvn package -DskipTests
  5. The compiled packages (-server and -client JAR files) will be inside the /target folder.

Run the Client

Usage: java -jar AM49-1.2-client.jar [--cli]

Options:
  --cli                 run in text mode (if omitted the GUI will start instead)

(Windows) The CLI uses colored text, therefore for the CLI the default Windows terminal is not supported and WSL is necessary.

Run the Server

Usage: java -jar AM49-1.2-server.jar [--port PORT] [--config FILE]

Options:
  --port PORT           network listening port (default 51015)
  --config FILE         path of the custom configuration file

Docker

A Dockerfile and a docker-compose.yml are available to build and deploy a docker container running the server.

To build the container:

  1. Place the server JAR in the same folder as the Dockerfile
  2. Rename the JAR file to server.jar
  3. Run docker build -t ingsw-server .

To deploy the container, run docker-compose up -d in the same folder as the docker-compose.yml file.

Configuration Files

The default configuration file can be found at src/main/resources/config/config.json.

This file contains all the necessary parameters and the game data needed for the game model to work.

Custom configuration files can be specified from within the clients for Offline games, by going to the Options menu. The custom configuration files loaded in the Options menu will work only for local games, as during Online games clients automatically download the configuration file loaded in the server. To know more about how the game data is synchronized when a client joins an Online game, see the specification of the Communication Protocol.

(Disclaimer) As stated above, the configuration file contains all the game data. The model is completely parameterized, therefore all parameters are necessary and must be specified. Since custom configurations were not a requirement for the project, this functionality has been implemented but not fully tested in all possible configurations.

License

This project is developed in collaboration with Politecnico di Milano and Cranio Creations.

masters-of-renaissance's People

Contributors

damianoamatruda avatar marcociarrocca avatar alex-atanassov avatar dependabot[bot] avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

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.