Skip to content

andrea-chizzola/ingswAM2021-Corigliano-Colombo-Chizzola

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Prova Finale di Ingegneria del Software - A.A. 2020 - 2021

Andrea Chizzola, Davide Corigliano, Marco Colombo

alt text

Introduction

The goal of the project is the implementation of the board game 'Masters of Renaissance'.
The game has been implemented according to the Model View Controller pattern and allows to play using a CLI or a GUI. The project is based on a distributed system, which can manage multiple matches and multiple clients. Each player decide what kind of interface to use (CLI or GUI) at the beginning of the game. The network relies on the use of sockets.

Documentation

The following paragraphs contain the documentation realized during the implementation of the game, a description of the tools used, and of the implemented functionalities.

Implemented Functionalities

  • Complete Rules
  • CLI
  • GUI
  • Socket
  • 3 Advanced Functionalities
    • Multiple Games - The server can manage multiple games at the same time.
    • Local Game - The client allows to play a solo game without connecting to the server.
    • Resilience to disconnection - The disconnected players can be reconnected to the game. While a player is disconnected, the game skips the turns of the disconnected player.

UML

The following diagrams contain the initial UML of the model and the final version of the model.
The model has been modified based on the suggestions received during the laboratories, and of the issues found during the implementation of the game.

The UML diagrams generated by IntellIJ can be found here.

Network Protocol

The following document contains the network protocol designed to manage the communication between the client and the server.

JavaDoc

The following document contains a description of the classes and the methods implemented, in the form of JavaDoc.

Tools used

  • Maven - A project management tool. Maven manages the plugins, the tools, and the libraries used in the project. Moreover, together with the plugin Shade, Maven allows building JARs.
  • JUnit - An open-source framework, used to write code tests.
  • JavaFX - A Java library used for the creation of Graphical User Interfaces (GUI).

Launching the game

The game can be launched from a terminal. Both the Client and the Server can be launched from the same JAR. The JAR is located in the Shade directory.

Server

The Server can be launched using the following command

java -jar AM19.jar -server -port portNumber

The parameter -port represents the port used by the server. If omitted, the port is 1234.

Client - CLI

The Client can be launched with a CLI interface using the following command

java -jar AM19.jar -client -ip address -port portNumber --cli

The parameters -port and -ip represents the port and the address of the server respectively. The parameter --cli represents the willingness of using a CLI interface.

Note: CLI should be launched terminal that supports ANSI escape, like Linux bash.

Client - GUI

The Server can be launched using the following command

java -jar AM19.jar -client -ip addres -port portNumber --gui

The parameters -port and -ip represents the port and the address of the server respectively. The parameter --GUI represents the willingness of using a GUI interface.

Note: if -port and -ip are omitted, the client the port is 1234 and IP is 127.0.0.1 ; if the type of interface is omitted, the interface is launched using CLI settings. If a player disconnects himself during the initialization phase, the game is over and all the players are disconnected.

Functionalities added to simplify the presentation of the project

In order to facilitate the presentation of the project, we decided to introduce a "cheat", which allows the player to start with an increased amount of resource. The cheat can be activated using the following command.

java -jar AM19.jar -server -port portNumber -cheat

Moreover, our GUI and CLI shows the leader cards of each player, and the top action token, allowing to check the correctness of the graphic updates and of the Lorenzo's action.

Members of the group:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages