You are on page 1of 2

RISK - Architectural Design

In the project RISK, we used MVC framework. The classes in the different tiers are depicted
below.

MODEL
AddContinent
Army
BorderDTO
Continent
ContinentDTO
Country
CountryDTO
Object State
GameFile
Queries Change State
Map
MapData
Player

Object Update
Notification

VIEW CONTROLLER
Dashboard.fxml Handel’s Events GamePlayController
Game-play.fxml MapEditorController
Map_editor.fxml MapListController
Map_selector.fxml
New-game.fxml

Select and Update View


Model

Model manages the behavior and data of the risk game. It responds for the information about its
state from the view , its state is changed by the controller classes. In our system model notifies
the observer classes when the information changes so that they can react.

In our system, we have AddContinent, Army, BorderDTO, Continent, ContinentDTO, Country,


CountryDTO, GameFile, Map, MapData, and Player classes inside the Model tier. These classes
represent the game entities which show their own state and actions.

View
View renders the model into a form suitable for visualization and interaction. This is the tier
where the user interacts to the system. View provides data to the model element and this data is
used for different purposes.

View layer is implemented using JavaFX. This level contains following files, Dashboard.fxml,
Game-play.fxml, Map_editor.fxml, Map_selector.fxml and New-game.fxml. These are
responsible for generating UI and interact with the user.

Controller
Controller receives the user input and initiates a response by making model objects. Controller
accepts the input from the events and triggers actions based on the input. The controller
translates the user's interactions with the view it is associated with, into actions that the model
will perform that may use some additional/changed data gathered in a user-interactive view.

This level contains following classes GamePlayController, MapEditorController and


MapListController.

You might also like