Skip to content
This repository has been archived by the owner on Oct 11, 2020. It is now read-only.
/ Santorini Public archive

Santorini Board Game in a distributed system via socket. Final Project of Computer Science's Bachelor's Degree at Politecnico di Milano 2019/2020

License

Notifications You must be signed in to change notification settings

ZhouJian26/Santorini

Repository files navigation

Santorini Logo

Santorini Game (Ing-sw-2020 GroupGC8)

release mvn test codecov

This is the final project of the group GC8 of Computer Science's Bachelor's Degree of Politecnico di Milano in year 2019/2020.

Background

The aim of the project is to learn how to design a project by our own and it implements the game Santorini.
Santorini is a strategy-based board game, it's inspired by the beautiful view of Santorini (an island in the southern Aegean Sea) and its unique buildings based on Cycladic architecture.

The game is originally developed by Roxley and Spin Master, Click here to see the official game website.

It's a very simple game, the rules are quite easy, every players has two workers and each turn consists of 2 steps: Move and Build.

Move: Move one of your worker into a neighboring space. You may move your worker on the same level, step-up one level, or step down any number of levels.

Build: Then construct a building level adjacent to the worker you moved. When building on top of the third level, place a dome instead, removing that space from play.

This game provides also many tool cards called God Power that makes the game even more interesting and challenging!
Click here for the full rules

UML

The Unified Modeling Language (UML) is a general-purpose, developmental, modeling language in the field of software engineering that is intended to provide a standard way to visualize the design of a system. (Wikipedia definition)

For this project we've made several version of UML diagram.

Click here to see the full version of the UML and final UML diagrams.

Realized Functions

  • Complete game rules : It's possible to play a game with 2 or 3 players and it fully supports all simple God's cards required.
  • Additional function Multiple Games : The server supports more games in the same time.
  • Additional function Advanced Gods : The game supports other Advanced God's cards which are: Hera, Medusa, Triton, Poseidon, Zeus.

Server Side

  • Implemented with JavaSE
  • Creates connections with Socket
  • Supports multiple games

Client Side

  • Implemented with JavaSE
  • Supports two types of user interface: CLI and GUI
  • GUI implemented with JavaFX
  • Clients are connected to server through Socket

Game

  • There will be different lobby for players with different game mode
  • Game starts when all players are logged in (two players or three players, depending on user's choice)
  • Challenger (the most god-like player) is chosen by server randomly
  • Challenger chooses god power cards at the beginning, the number of cards should equal to number of players (two or three)
  • Challenger chooses the start player, the start player can be challenger itself
  • For every game, player's id (username) is unique
  • During the game, if any player disconnects from game manually or accidentaly (connection's problem), the game will be ended for all players, unless the disconnected player has already lost the game
  • Players cannot reconnect to game
  • Players must follow game's rules

Tests Coverage

Controller and Model are all tested with a coverage 100%.

Failed loading

Click here for tests coverage report

Getting Started

Before starting

This project requires JAVA 11 or later to run.
For developers it requires also maven.

For Non-Developers (If you just want to play)

  1. Download the following assets from the lastest release
  • Application.jar
  • Server.jar
  1. Run the server via command line
    java -jar Server.jar

  2. Run GUI client by double clicking on the Application.jar or via command line
    java -jar Application.jar for GUI
    java -jar Application.jar cli for CLI

For Developers

  1. Clone the repository

  2. Create assets via command line
    mvn clean package

  3. In the shade folder will be two .jar file

  • Application.jar
  • Server.jar
  1. Run the server via command line
    java -jar Server.jar

  2. Run GUI client by double clicking on the Application.jar or via command line
    java -jar Application.jar for GUI
    java -jar Application.jar cli for CLI

Usage

CLI

After you run the java -jar Application.jar CLI for CLI, you should be able to see the following view:

Type correctly server ip and port then insert your preferred game mode Failed loading Failed loading

Insert your username Failed loading

Then follow the instructions by typing the numbers Failed loading Failed loading

GUI

After you run the java -jar Application.jar for GUI, you should be able to see the following view: Failed loading

Choose which game mode do you prefer: 2 players or 3 players Failed loading

Insert your username: Failed loading

Then wait for other players to join

Once the the lobby is fulled with the correct number of players, the game will start immediately.

A random player will be chosen to choose god power cards, the numbers of cards chosen should be the same number of players. Failed loading

Move your mouse above gods and you'll be able to read the descrption of their power.

Once every player finished to choose their own god, a random player will choose a player to start the game. Failed loading

Choose a color for your worker on the right side and place them on the board. Failed loading

On your turn you'll see highlighted grids on the board that means all your possible moves in game at the current turn, choose your move(move/build) on the right side. Failed loading

You can move your mouse above the gods to see their power. Failed loading

Now open up your mind and enjoy the game!

Contributors

License

Apache