Giter VIP home page Giter VIP logo

zhoujian26 / santorini Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 1.0 127.98 MB

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: Apache License 2.0

Java 99.88% CSS 0.12%
game santorini school-project final-degree-project politecnico-di-milano bachelor-project santorini-game polimi board-game turn-based-strategy

santorini's Introduction

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

santorini's People

Contributors

actions-user avatar lilysana avatar xuzewei28 avatar zhoujian26 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

xuzewei28

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.