Skip to content
This repository has been archived by the owner on Sep 25, 2022. It is now read-only.

Software engineering final test: simulation of the board game Eriantys

License

Notifications You must be signed in to change notification settings

SoulFire6/ing-sw-2022-vitali-valenti-venini

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Software Engineering Project A.Y. 2021-2022

Simulation of the board game Eriantys

Eriantys' box cover

Final Score: 30/30 cum laude

Group GC33:

Contributions

Table of contents

  1. Project specification
  2. Implemented Features
  3. How to install
  4. How to run
    1. Terminal
    2. Linux/MacOsX
    3. Windows
  5. How to play

Project specification

The project consists of a Java application for the board game Eriantys

The final version will include:

  • initial high level UML diagram
  • final UML diagrams, automatically generated from the code
  • working implementation of the game, compliant to the rules and requirements specified for the project
  • documentation for the communication protocol between client and server
  • documentation for the peer reviews (2 total)
  • source code for the implementation
  • source code for the JUnit tests

Test Coverage

Implemented features

Feature Status Details
Simplified rules Normal mode only
Complete rules Expert mode with 8 character cards
CLI Command line input
GUI Graphical user interface
Socket Client-server architecture
Character cards All 12 cards instead of just 8
4 Player mode Allows 4 players to participate in teams of 2
Multiple games Allows simultaneous games on the same server
Persistence Save and load game state to disk
Disconnection Resilience Allows players to reconnect

Table Legend:

❌ Not implemented

⚠️ Work in progress

✅ Implemented

How to install

Requirements

Java JDK 17

Compiling

(Skip if using pre-compiled jars)

  1. Clone this repository
  2. Use a compatible maven version to run clean then package
  3. A jar file named GC33-[version] will be created
  4. Run the jar file directly or with a launch file (must be renamed to Eriantys to function with given launch files)

How to run

Terminal

To get info on command line arguments

java -jar Eriantys.jar --help

To run client

java -jar Eriantys.jar -client -u <username> [-cli | -gui ] -ip <server-ip> -p <server-port>

To run server

java -jar Eriantys -server -p <server-port>
Command line arg Use Required Alternate form
client Start client Yes, if running client c
server Start server Yes, if running independent server s
cli Specifies CLI client Yes, if running client
gui Specifies GUI client Yes, if running client
user Specifies username No u
ip Specifies ip No
port Specifies port No p

Linux / MacOsX

Same as terminal, replacing

java jar Eriantys.jar

with

./Eriantys.bash

For a more permanent solution you can directly add the arguments to the bash file, then just run the bash file

Windows

Same as with Linux and MacOsX, but with .bat instead of .bash

How to play

CLI

On launch, you will see a screen that looks like this

Eriantys logo

If not established previously through command line arguments or if parameters are incorrect you will be asked for a username, ip and port You will also be offered the chance to run the server on your client as to avoid having to run one independently, but this means that any crashes or disconnections on your client will affect the server as a whole

After successfully entering the required information, if the server can be reached you will be greeted by the server welcome message, which will require you to choose between creating/joining a lobby or disconnecting

Upon creating a new lobby you will be asked for a name to identify it, this cannot overlap with any currently existing lobbies

Lobby creation menu

If instead you choose to join a lobby, you will be shown all currently existing lobbies with stats pertaining to player count, game mode, whitelist....

Lobby join menu

After a game has loaded you will be presented with the game view

CLI game view

For information on how to perform actions please use the help command

CLI help

GUI

On launch, you will be presented with a login page, prefilled with values if specified beforehand on the command line

GUI initial screen

You may choose to join an existing server or host your own from the client itself, fields for ip and port will be filled with default values if empty on either of these buttons being pressed

Next, you will be greeted by the server's main menu, where you will have the same choices as the cli but presented in the form of buttons

GUI main server menu

If you chose to create a new lobby you will be asked for a name identifying it, then you can either select an existing save file to load or select parameters to set up a new game

GUI lobby creation

GUI save selection

GUI player number selection

GUI save selection

Finally, you will be placed in the lobby's waiting room which shows currently connected players

GUI waiting room

If instead you were to choose to join an existing one, you will be presented with a choice of all active lobbies, with relative info

GUI join lobby

Once a game has started you will be presented with the game view

GUI game view

All actions are performed by interacting with the UI elements

Tools used

  • AstahUML - generation of UML diagrams
  • IntelliJ IDEA Ultimate Edition - IDE used to manage the project and its dependencies
  • JavaFX - GUI Framework of choice