COMP2396
Loading...
Searching...
No Matches
SecurityGuard.java
Go to the documentation of this file.
1package assignment2;
2
3/**
4 * The SecurityGuard is well-funded by the department and must use a SuperGun.
5 * Only the guard knows how to boost the SuperGun.
6 * It is a subclass of the Character class and has the ability to boost a SuperGun.
7 */
8public class SecurityGuard extends Character {
9
10 /**
11 * Constructs a new SecurityGuard with the specified name, energy level, and skill level.
12 *
13 * @param name the name of the security guard
14 * @param energyLevel the initial energy level of the security guard
15 * @param skillLevel the skill level of the security guard
16 */
17 public SecurityGuard(String name, int energyLevel, int skillLevel) {
18 super(name, energyLevel, skillLevel);
19 }
20
21 /**
22 * Boosts the specified SuperGun for the next attack.
23 *
24 * @param w1 the SuperGun to be boosted
25 */
26 public void boostWeapon(SuperGun w1) {
27 w1.boost();
28 }
29}
The Character class represents any game character with a name, skill level, and energy level.
Definition Character.java:7
The SecurityGuard is well-funded by the department and must use a SuperGun.
SecurityGuard(String name, int energyLevel, int skillLevel)
Constructs a new SecurityGuard with the specified name, energy level, and skill level.
void boostWeapon(SuperGun w1)
Boosts the specified SuperGun for the next attack.
The SuperGun can produce a boosted shot, such that the shot produces two times power than the origina...
Definition SuperGun.java:8
void boost()
Boosts the gun for the next attack.
Definition SuperGun.java:24