Skip to content

Prova Finale di Ingegneria del Software - Polimi Ingegneria Informatica

Notifications You must be signed in to change notification settings

pontig/ing-sw-2023-pontiggia-pasini-reffo-perriello

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ing-sw-2023-pontiggia-pasini-reffo-perriello

My Shelfie - Board game by Cranio

My Shelfie Box

Description

The project consists of implementing a distributed system, in Java, composed of a single server capable of handling only one game and multiple connected clients (from 2 to 4). Each client can participate in only one game at a time, but the same computer can host multiple clients simultaneously. The MVC (Model-View-Controller) design pattern has been used, and the network connection is managed through both Socket and RMI (Remote Method Invocation). Clients can independently choose to use either of them as games between different technologies are supported. Interactions and gameplay can take place through a command-line interface (CLI) and a graphical user interface (GUI).

Working group - GC22

Project requirements

Here you can find the complete specifications: Project Requirements

Functionality State
Basic Rules #2EFF00
Complete rules #2EFF00
Socket #2EFF00
RMI #2EFF00
CLI #2EFF00
GUI #2EFF00
Chat #2EFF00
Server persistence #2EFF00
Resilience to client disconnections #FF0000
Multiple parallel matches #FF0000

Legend:

#2EFF00 - implemented

#FFFB00 - work in progress

#FF0000 - not implemented

Documentation

UML - (Unified Modeling Language)

JavaDOC

The documentation includes descriptions for the majority of the utilized classes and methods, following Java's documentation techniques. It can be accessed either by generating it from the code or by visiting JavaDOC

Test Coverage - (Server side)

Libraries and Plugins

Library/Plugin Description
Maven Build automation tool primarily used for Java projects
JavaFX Graphic library to create user interfaces (more innovative than Swing)
JUnit Unit testing framework

Run the game

1. Java

To run the game you need a runtime environment for applications written in the Java language:

Upon successfully installing Java Runtime Environment (JRE) and Java Development Kit (JDK) on your personal computer, you can verify its proper installation by entering the following command in the terminal:

java -version

2. JavaFX

To visualize the graphical user interface (GUI) properly, you could need command-line tools and technologies that allow you to develop expressive content for applications deployed to browsers, desktops, and mobile devices:

3. Run locally - (Work on Windows for sure)

Create a folder called 'MyShelfie' and put inside:

  i. The JAR file from the artifacts' folder

My Shelfie Server:

   Open a terminal and change directory till you are in MyShelfie folder.

   Now you can start the server by typing:

java -jar Server.jar 

My Shelfie Client:

   Open a second terminal and change the directory till you are in MyShelfie folder.

   Now you can start the client by typing:

java -jar Client.jar

Issues you could encounter

In all the operating systems - If you can not visualize correctly the images when playing on GUI

Inside the folder 'MyShelfie' created before, insert:

  i. The SDK folder that can be downloaded following the instruction in the previous section (unzip it if necessary)

My Shelfie Server:

   Run it as before

My Shelfie Client:

   Open a second terminal and change the directory till you are in MyShelfie folder.

   Now you can start the client by typing:

java --module-path <Name of SDK folder>/lib --add-modules javafx.controls,javafx.fxml -jar Client.jar
#Remember to change <Name of SDK folder> (it should be something like 'javafx-sdk-20.0.1')

A - Windows

  • If you are utilizing Windows 10 or a later version, you may encounter difficulties in properly rendering ANSI colors when using the command-line interface (CLI). To resolve this issue, please execute the following command in the terminal:

    reg add HKCU\Console /v VirtualTerminalLevel /t REG_DWORD /d 1
  • If you want to open multiple client on the same machine, and more then one playing through CLI, before starting each 'Client.jar', you must open and additional terminal for each of them that will use CLI and follow this:

    My Shelfie Client Chat on CLI:

      In the second terminal change the directory till you are in MyShelfie folder.

      Now you can start the client chat by typing:

    java -jar TerminalServer.jar

      In the file 'port.txt' in 'MyShelfie' folder you must press enter key after the port number, before starting a new 'TerminalServer.jar'

B - Linux

  • No issues found yet

C - MacOS

  • We were unable to test it as such a machine was not available

How to play

  • Written rules
  • Video rules - [ITA]
  • When using GUI version:
    • To open the chat terminal press on the keyboard:`
      T
    • To close the chat terminal press on the keyboard:`
      esc
  • To use the 'Server persistence Functionality' on a server crash:
    • If you want to reload the game:
      1. Start the server again
      2. Start the client and enter the same nicknames as the previous match
    • Otherwise:
      1. Delete file 'status.json' from MyShelfie folder

Other info

NOTA: My Shelfie è un gioco da tavolo sviluppato ed edito da Cranio Creations Srl. I contenuti grafici di questo progetto riconducibili al prodotto editoriale da tavolo sono utilizzati previa approvazione di Cranio Creations Srl a solo scopo didattico. È vietata la distribuzione, la copia o la riproduzione dei contenuti e immagini in qualsiasi forma al di fuori del progetto, così come la redistribuzione e la pubblicazione dei contenuti e immagini a fini diversi da quello sopracitato. È inoltre vietato l'utilizzo commerciale di suddetti contenuti.

About

Prova Finale di Ingegneria del Software - Polimi Ingegneria Informatica

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •  

Languages