PROVA FINALE INGSW

AA 2023/2024

team IS24-AM02

1.

Discovery of requirements for a project.

MVC approach

2.

UML design

Implementation of the Model

Testing

3.

UML design

Implementation of

Controller

Testing

5.

Design and

implementation of

TUI & GUI

 

4.

Design and

implementation of

Network Layer

(RMI, TCP)

Testing

4.

Design and

implementation of

Network Layer

(RMI, TCP)

Testing

6.

Corner Case Testing

Beta Testing

CI/CD via Docker

Index

#1: Model

The problem

We wanted the methods performing an operation on the card to be completely unaware of its type

ex. getPoints()

1.

Build

SideGameCard that is the parent class to BackGameCard and FrontGameCard. This is possible thanks to Java's Polimorphism

2.

Usage Example

Calling getPoints(), for BackGameCard we return 0, but for FrontGameCard we calculate it based on the specific child class

3.

#2: Network

The problem

We wanted all the network calls to be unaware of the Network protocol in use (TCP or RMI) 

1.

The solution - TCP

ServerNetwork

ControllerMapper.

sendMessage(TCPm)

TCPServerHandler.

sendMessage()

2.

The solution - RMI

We implemented the solution as in the next  slides.

3.

sendMessage(TCPMsg)

ServerNetworkControllerMapper.sendMessage()

TCPServerAdapter.sendMessage()

clientConnectionHandler.send()

sendMessage(RMIMsg)

ServerNetworkControllerMapper.sendMessage()

RMIServerSender.sendMessage()

stub.receive[messageType]()

#3.1: TUI

Modular DrawArea

Each TUI component is made using a DrawArea, responsible to draw each component using HashMap<char, screenCoordinates>

1.

Controller

A Controller

receives NetworkMessage(s) and decides which scene to show

2.

Dynamic Scenes

Each Scene is updated following two types of events: User Input and Network Events 

3.

#3.2: GUI

JavaFX

Each Scene is built with a combination of three elements:

  1. FXML file
  2. SceneController
  3. CSS styling

1.

SceneController

Each one extends the GUI.Controller class, that implements standard actions such as switchScene() or showToast()

2.

Event Handling

To avoid code redundancy on each

SceneController,

we use polimorphism

 @Override propertyChange

3.

#4: Threading

The problem

Multigame feature: each game needs to modify its Model instance without affecting any other games that are being played on the server

1.

The solution

Each methods that modify Model's data have been syncronized on its corresponding Game instance.

2.

Scaling

We also tested the scalability simulating 5000 games running simultaneously.

3.

#5: CI/CD

Developing

CI / CD

These slides aren't slides...

#6: Demo Scenarios

End Game Handling

1.

Final Turn Handling

When a player reaches 20 points, "Final Turn" mode is triggered

2.

Empty Decks Handling

When two decks are empty, "Final Turn" mode is triggered

3.

THANK YOU

© MFoche 2024