The goal of the project is to create a digital version of the board game Masters of the Renaissance as a distributed system consisting of a single server capable of managing one game and multiple clients using the MVC pattern.
In Masters of Renaissance, you are an important citizen of Florence and your goal is to increase your fame and prestige. Take resources from the market. Expand your power both in the city and in the surrounding territories! Every card gives you a production power. Try to use the leaders’ abilities to your advantage and don’t forget to show your devotion to the Pope!The following requirements were covered in the development of the project:
- Complete Rules
- CLI and GUI
- Communication Protocol (Socket)
- Advanced Features: Local Game
- Advanced Features: Resilience to Disconnections
The class diagrams of the model are shown below. The initial UML was done in the design phase, while the final UML was generated by intelliJ. There are no substantial differences between the 2 graphs. There is also a graph that shows inheritance between classes more clearly.
Here is the list of tools used to carry out this project:
Tool | Description |
---|---|
IntelliJ | IDE |
Draw.io | drawing tool |
Maven | Build automation tool used primarily for Java projects. |
JavaFx | Graphic library for creating user interfaces. |
JUnit | Unit testing framework. |
All the documentation regarding the java classes with their methods is available here
All the documentation regarding the comunication protocol is available here
From the results of Junit we have a line covered 96% on the model, results that we believe are satisfactory.The controller has not been tested as it is a very narrow part of the code that does not perform complex actions. All the analyzes on the model classes are also shown below
The game can be started from the following Jar files. The project was compiled using java 15, however there should be no problems recompiling it with a not too dated Java version.
The server can be started via the command line, where you can optionally choose a custom listening port via the --port
parameter
> java -jar AM16-server.jar [--port xxxx]
ASCII ART was used in the implementation of the CLI, so we recommend the use of terminal that supports UTF-8 encoding and ANSI escapes. The client can be started via the command line by specifying 2 mandatory parameters:
--cli\gui
: to select the display mode--online\offline
: to select the game mode
if the parameters are not specified correctly, the mode is selected by default: CLI ONLINE
> java -jar AM16-client.jar --cli\gui --online\offline
Note: We have included a "cheat" command that provides 100 units of each resource to show the advanced game stages
Having reached the conclusion, there is only one thing left to do: "it's coffee break gentlemen"
Project carried out in collaboration with Politecnico di Milano and Cranio Games which granted us the license to use the graphic material.