Skip to content

Online Multiplayer Multithread Java CLI Implementation of Masters of Renaissance Board Game

Notifications You must be signed in to change notification settings

omeresas/Masters-of-Renaissance-Java-Game

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Masters of Renaissance Multiplayer Board Game

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

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.

drawing

Our Java Implementation

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.

Class Diagrams

Sequence Diagrams

How to Run the Game?

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
  1. First, run the server. The port number is 30000 and it is hardcoded in the server class.

  2. 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.

  3. 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.

  4. After the connection of the other player(s) and their selection of playernames, the server randomly assigns turn order of players.

  5. Next, just like physical board game counterpart, the server sends each player four leader cards and asks them to choose two of them.

  6. As the last step before the first action of first player, initial resources are transfered to players with respect to the game rules.

  7. The first players starts the game by executing his/her selection of actions.

  8. 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.

  9. The points of players are counted by server and the winner is announced to players.

Screenshots of the Game

  • Running server jar:

drawing

  • Running client jars for first and second player respectively:

drawing

drawing

  • Common market tray:

drawing

  • Faith track and personal board that shows available resources and owned cards:

drawing

  • Action selection menu and activation of production action:

drawing

  • Management of warehouse resources:

drawing

  • Viewing other player(s)'s personal boards:

drawing

Contributors

  • Ömer Esas
  • Amor Madhkour

About

Online Multiplayer Multithread Java CLI Implementation of Masters of Renaissance Board Game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%