preview

Dodge Game Essay

Good Essays

The Dodge Game - Software Design and Modi ability
This report is submitted in partial ful lment of the requirements of the ELEN7045 - SD
Methodologies, Analysis and Design

Abstract
The Dodge Game is a mini project in Software Design and Modi ability. The results of this development process are supposed to an executable game capable of running in a Windows environment. The game has be a developed using object oriented principles and makes use of a simple graphics. The chosen development environment was java and the graphics library was the Java 2D graphics. The approach taken in the design was a decoupling or component based design. The implemented solution runs on a JPanel and renders graphics on to the game screen
with …show more content…

The game aim is mainly to detect collision of falling raindrops and the method is-
ThereCollision() handles this when its called in the actionPerformed(ActionEvent) method.
2.2.2 Architectural design
The proposed solution has four classes:
 Rg RainDrop which controls the behavior and all the functionalities of raindrops
 Rg Player which controls the behavior of the player and all its activities on the game screen
1
 Rg GameScren which extends the Rg Panel Controls the relationship of all the classes  Rg Panel is the backbone of all the activities happening on the Rg Gamescreen
Figure 1: Dodge Game Class Diagram
The gure - 1 is the class diagram for all the classes listed above. The chosen architecture of the game has decoupled game as seen in the class diagram in gure 1. Each of the classes has a single responsibility as a way to try and minimize cluttering the design. It shows all the relationships and and the references to interfaces and also to base classes.
As seen in the class diagram each class form an individual component to the big solution of the game problem. The choice of this design was mainly to enable reusability and try to enable code re-use. There is also an adoption of the Model-view-controller pattern[1] in the design of the classes. The raindrop and player have models and controllers methods within them and JPanel is responsible giving the view to the user.
Rg Player Class
This class is responsible for

Get Access