This repository contains the code and documentation artifacts for the Java implementation of the Masters of Renaissance: Lorenzo il Magnifico board game. The project has been implemented by myself and another international student to be part of a mandatory course in my PoliMi Computer Science & Engineering MSc programme.
Table of Contents
- About the Board Game
- Our Java Implementation
- How to Run the Game
- Screenshots of the Game
- Contributors
The game is a multiplayer card game that can be played by up to 4 people. Each player have different kinds of resources and different kinds of cards. Players take turns to execute their selection of actions. There are different kinds of situations that triggers the end of the game, and the winner is chosen according a specific point-counting system.
-
For the official webiste of the game, refer to https://craniointernational.com/products/masters-of-renaissance/
-
For the entire set of rules on how to play the game, refer to the rulebook
-
For a short video tutorial of the game, refer to https://youtu.be/0DaaO49X4xw
-
For a complete playthrough of two players, refer to https://youtu.be/PqQhw71V2R0
In our design, we shared tasks into a one common server instance, and one client instance per player. We mainly made use of Model-View-Controller and Publisher/Listener patterns with the notion of events between different MVC components. From the network aspect, we utilized low-level socket programming, and took advantage of multi-threading in our server to handle different client connections. Our implementation does not rely on third-party libraries or frameworks, except for core Java utilities and GSON library that we used to serialize/deserialize Java objects into/from JSON notation.
You can try our game by running server and client .jar files present in the deliveries folder, simply by:
java -jar Server.jar
java -jar Client.jar
-
First, run the server. The port number is 30000 and it is hardcoded in the server class.
-
Run the client. If you want to connect to a local server, you should enter "localhost" as the IP of the server, while port number remains 30000. If you want to connect to a remote server on a different network, you should enter the public IP address of the remote server with the same port number.
-
The first player connected to the server enters player name and total number of players, as shown in the screenshot with light gray background below.
-
After the connection of the other player(s) and their selection of playernames, the server randomly assigns turn order of players.
-
Next, just like physical board game counterpart, the server sends each player four leader cards and asks them to choose two of them.
-
As the last step before the first action of first player, initial resources are transfered to players with respect to the game rules.
-
The first players starts the game by executing his/her selection of actions.
-
The game continues in turn order and when one of the criteria which ends the game is met, the game finishes by giving players who have not played in that turn the right to play their last turn.
-
The points of players are counted by server and the winner is announced to players.
- Running server jar:
- Running client jars for first and second player respectively:
- Common market tray:
- Faith track and personal board that shows available resources and owned cards:
- Action selection menu and activation of production action:
- Management of warehouse resources:
- Viewing other player(s)'s personal boards:
- Ömer Esas
- Amor Madhkour