Starting from:

$25

CSE443- Object Oriented Analysis and Design: Homework 2 Solved

You have quit your job at “Yakan Top Turizm İnşaat Nakliyat Danışmanlık Teknoloji Ticaret ve

Limited Şirketi” because their company name was too long. You are now working for “Az Laf, Çok İş A.Ş.”

You have been tasked as project manager for the new game “Campuses and Puzzles”. The game canvas has been provided in the attached image file. The top area will contain 3 enemies/monsters (E1, E2, E3) and the bottom half will have 6x9 square tiles. This is a game where you match horizontally or vertically 3 tiles of the same color (same idea as candy crush). Once you achieve that, the matched tiles disappear and damage the enemy that they vertically intersect with. Each enemy intersects with 3 columns of tiles. The user will play by clicking on two adjacent tiles in order to switch their positions. If the tiles match, they will disappear, and the tiles below them will be shifted upwards to fill their place. New tiles will appear from the bottom of the screen to fill the void at the bottom. If new matches form, they will be matched/removed automatically, enabling cascaded matches.

The tiles will be of 3 colors: red, green and blue. If there are no matching tiles, the game will shuffle the board automatically. The enemies will also be of the same 3 colors; one color per enemy. The trick is that when you match 3 tiles of color X, they will perform double damage against enemy of color Y and half damage against color Z, cf the following table.

X
Y
Z
Red
Green
Blue
Blue
Red
Green
Green
Blue
Red
After every move the player makes on the tiles, it will be the computer’s turn. The computer will also make one move on the tiles (randomly), and try to damage the player’s characters (C1, C2 and C3), that will also be of a certain color.

If all 3 player characters die, the user loses. If all 3 enemies are defeated (i.e. their health drops to 0), then new random enemies appear and the characters’ health is replenished.

Now, each enemy/character has certain numerical properties: strength, health and agility.

Type
Strength
Agility
Health
Blue/Ice
125
75
100
Red/Fire
100
125
75
Green/Nature
75
100
125
Strength determines the damage the computer will perform when matching tiles of the color corresponding to the color of that enemy. Agility determines the defense of the enemy against attacks, and health is...health. That’s what you reduce when you receive damage.

The issue is that enemies can come in 3 different styles too, and depending on the style certain properties change.

Style
Strength
Agility
Health
Atlantis
x0.8
x1.2
x1.2
Valhalla
x1.3
x0.4
x1.3
Underwild
x0.8
x1.6
x0.8
So for example an Atlantis-Fire enemy will have 80 strength while an Atlantis Nature enemy will have 60 strength.

The damage that matched tiles result on an enemy/character will be calculated as:

100 x ( Strength / Agility ) ^ 1.35

where strength is the strength of the enemy/character of the color of the matched tiles, and agility is the agility of the enemy/character receiving the damage. Of course you will also take into account the XYZ rules.

Implement the abstract factory design pattern for creating enemies and characters alike. Your project must lead to a playable game. Print all actions as text messages at the statusbar (How much damage was performed by who to who, who died, etc).

You have full artistic freedom to design the various concepts. They can be as simple or as sophisticated as you want. All characters and enemies are set randomly.

Rules:

Satisfy the customer’s needs. The animations (in case of cascaded matches must be slow enough to observe what is happening).
Both Java Swing and FX are acceptable as visual libraries.
Your game must have start/pause/exit buttons in its top menu.
If it freezes for any reason -90.
Implementing the abstract factory pattern correctly +50
g) Deliver a working game satisfying the customer’s needs and these rules +30. h) Javadoc, reports, etc: +20
For questions, use the moodle page.

Good luck.

More products