Giter Club home page Giter Club logo

ing-sw-2021-seguini-villa-zeni's Introduction

ing-sw-2021-Seguini-Villa-Zeni

latest commit latest release

Versione Italiana

Il gioco

Questo repo contiene una versione Java del gioco Maestri del rinascimento. Il progetto è stato sviluppato durante l'anno 2020/21 per il corso di Ingegneria del Software al Politecnico di Milano, come parte finale di valutazione per il conseguimento della laurea triennale in Ingegneria Informatica. Gli sviluppatori sono stati:

Funzionalità Implementate

Funzionalità Stato
Regole Semplificate GREEN
Regole Complete GREEN
Socket GREEN
CLI GREEN
GUI GREEN
Partite Multiple GREEN
Resilienza GREEN
Partita Locale GREEN
Persistenza RED
Editor dei parametri RED

Legenda

RED Non Implementato     YELLOW Implementazione in corso    GREEN Implementato

Installazione

Per avviare il gioco è necessario scaricare JavaSE 15 (o versioni superiori). Il giocatore che creerà la partita, per poter hostare il server, può decidere di installare ngrok, sebbene siano disponibili altre modalità che la guida non coprirà.

Scaricare in locale il repository come segue

git clone https://github.com/GiorgioSeguini/ing-sw-2021-Seguini-Villa-Zeni.git

su linux. Per windows potrebbe essere necessario scaricare il repo in formato zip ed estrarlo.

I file eseguibili per il gioco sono contenuti nella cartella /shade.

Come far partire il server

Entrare nella cartella con l'eseguibile di ngrok e aprire una connessione TCP alla porta 12345. Sia dalla bash Linux, sia dalla PowerShell di Windows, è possibile farlo attraverso il comando (la bash deve essere aperta nella stessa dir di ngrok)

./ngrok tcp 12345

Il numero della porta deve essere necessariamente quella indicata. Se si volesse modificare la porta, sarà necessario modificare l'attributo nella classe Server e ricompilare i file .jar .

Successivamente aprire la PowerShelf Windows o la bash linux all'interno della cartella \shade e digitare

java -jar SERVERG_C39.jar

Ora il server è attivo e può essere lasciato acceso fino a quando non si vuole smettere di giocare, anche se si vogliono disputare più partite.

Come far partire il client

Per poter collegare il client al server sarà necessario aprire la PowerShelf Windows o la bash linux all'interno della cartella \shade e digitare

java -jar CLIENT_C39.jar ADDRESS PORT

dove ADDRESS e PORT sono rispettivamente l'indirizzo e la porta del server. Nel caso di ngrok il messaggio potrebbe essere

Session Status: online
Account: YOURACCOUNT (Plan: Free)
Version: 2.3.40
Region: United States (us)
Web Interface: http://127.0.0.1:4040
Forwarding:  tcp://4.tcp.ngrok.io:11387 -> localhost:12345                                              

Di conseguenza, 4.tcp.ngrok.io sarà l'indirizzo mentre 11387 sarà la porta.

Di default il client aprirà la parte grafica, tuttavia è possibile giocare via linea di comando attraverso l'aggiunta del parametro cli

java -jar CLIENT_C39.jar ADDRESS PORT cli

Come giocare

Le modalità di inizio partita possono essere tre: la prima consiste in una partita privata nella quale un utente può creare una stanza e tutti gli altri giocatori possono connettersi (si noti che il creatore della stanza deve comunicare il nome della stanza agli altri giocatori per poter accerdere) ; la seconda consiste nel poter giocare online con qualsiasi utente connesso al server (questa modalità avrebbe senso se le coordinate del server fossero pubbliche), basterà difatto solo identificarsi con un nome e inserirsi in una partia da un massimo di 4 giocatori; la terza non necessità di un server, ma si può giocare solo da soli.

Le regole del gioco italiane si trovano all'interno del repository qui

Nota bene: è sempre possibile riconettersi ad una partita in corso se si memorizzano il proprio nickname e il nome della room.

Tools

Per la realizzazione del progetto sono stati utilizzati :

Test e Documentazione

La documentazione è disponibile qui.

I test hanno raggiunta la seguente copertura.

Test result Test result Test result Test result

English Version

The Game

This repo contains a Java version of the game Masters of renaissance. The project has been developed for the course Software Engineering at Politecnico di Milano as a final part of examination for the Bachelor in Computer Engineering. The contributors were:

Implemented Funcionalities

Functionalities Status
Basic Rules GREEN
Complete Rules GREEN
Socket GREEN
CLI GREEN
GUI GREEN
Multiple Games GREEN
Resilience GREEN
Local Game GREEN
Persistence RED
Parameter Editor RED

Legend

RED Not Implemented     YELLOW Implementing    GREEN Implemented

Installation

To start the game you need to download JavaSE 15 (or updated versions). The player that will start the match can install ngrok to host the game. Other options are available but will not be covered in this guide.

Download the repo as it follow

git clone https://github.com/GiorgioSeguini/ing-sw-2021-Seguini-Villa-Zeni.git

on linux. For Windows should be necessary download the repo in zip format and then unzip it. The executable files are stored in the /shade directory.

How to start the server

Open the ngrok directory with the terminal (linux or windows) and open a TCP connection at port 12345, as it follow

./ngrok tcp 12345

The port number has to be 12345. If it should be necessary to modify the port, open the project class Server and edit the attribute, then rebuild the .jar file.

Open the terminal at dir \shade and copy

java -jar SERVERG_C39.jar

Now the server has started and can be leaved powered on even a match ends.

How to start the client

To connect the client will be necessary open the terminal at the \shade dir and copy

java -jar CLIENT_C39.jar ADDRESS PORT

where ADDRESS and PORT are the server address and port. In our case, the ngrok app will print a text as it follow

Session Status: online
Account: YOURACCOUNT (Plan: Free)
Version: 2.3.40
Region: United States (us)
Web Interface: http://127.0.0.1:4040
Forwarding:  tcp://4.tcp.ngrok.io:11387 -> localhost:12345                                              

4.tcp.ngrok.io will be the address and 11387 the port.

On default the client will open the GUI, but if you add the parameter cli at the end of the command it will be possible start the game from command-line.

java -jar CLIENT_C39.jar ADDRESS PORT cli

How to play

A game can be started in three different ways: I can create a room where my friends can join me (a room can be joined through its name); I can join an online public multiplayer filling the infos with my personal nickname and with how many players I want play with; I can play alone offline.

You can find the english rules here

Ps. It is alway possible rejoin an alredy started match if I have my nickname and the room name.

Tools

In this project were used the following tools:

Test and Documentation

You can find the documentation here.

The tests have reached the following coverage.

Test result Test result Test result Test result

ing-sw-2021-seguini-villa-zeni's People

Contributors

fabiovillaa avatar giorgioseguini avatar

Stargazers

 avatar

Watchers

 avatar

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.