AA 2023/2024
team IS24-AM02
Discovery of requirements for a project.
MVC
approach
UML design
Implementation of the Model
Testing
UML design
Implementation of
Controller
Testing
Design and
implementation of
TUI & GUI
Design and
implementation of
Network Layer
(RMI
, TCP
)
Testing
Design and
implementation of
Network Layer
(RMI
, TCP
)
Testing
Corner Case Testing
Beta Testing
CI/CD
via Docker
The problem
We wanted the methods performing an operation on the card to be completely unaware of its type
ex. getPoints()
Build
SideGameCard
that is the parent class to BackGameCard
and FrontGameCard.
This is possible thanks to Java's Polimorphism
Usage Example
Calling getPoints()
, for BackGameCard
we return 0
, but for FrontGameCard
we calculate it based on the specific child class
The problem
We wanted all the network calls to be unaware of the Network protocol in use (TCP
or RMI)
The solution - TCP
ServerNetwork
ControllerMapper.
sendMessage(TCPm)
TCPServerHandler.
sendMessage()
The solution - RMI
We implemented the solution as in the next slides.
sendMessage(TCPMsg)
ServerNetworkControllerMapper.sendMessage()
TCPServerAdapter.sendMessage()
clientConnectionHandler.send()
sendMessage(RMIMsg)
ServerNetworkControllerMapper.sendMessage()
RMIServerSender.sendMessage()
stub.receive[messageType]()
Modular DrawArea
Each TUI
component is made using a DrawArea
, responsible to draw each component using HashMap<char, screenCoordinates>
Controller
A Controller
receives NetworkMessage(s)
and decides which scene to show
Dynamic Scenes
Each Scene
is updated following two types of events: User Input
and Network Events
JavaFX
Each Scene
is built with a combination of three elements:
FXML
fileSceneController
CSS
stylingSceneController
Each one extends the GUI.Controller
class, that implements standard actions such as switchScene()
or showToast()
Event Handling
To avoid code redundancy on each
SceneController
,
we use polimorphism
@Override propertyChange
The problem
Multigame feature: each game needs to modify its Model
instance without affecting any other games that are being played on the server
The solution
Each methods that modify Model
's data have been syncronized on its corresponding Game
instance.
Scaling
We also tested the scalability simulating 5000 games running simultaneously.
End Game Handling
Final Turn Handling
When a player reaches 20 points, "Final Turn" mode is triggered
Empty Decks Handling
When two decks are empty, "Final Turn" mode is triggered