File tree Expand file tree Collapse file tree 4 files changed +4
-15
lines changed
command/src/main/java/com/iluwatar Expand file tree Collapse file tree 4 files changed +4
-15
lines changed Original file line number Diff line number Diff line change 3
3
public class Goblin extends Target {
4
4
5
5
public Goblin () {
6
- this . setSize (Size .NORMAL );
7
- this . setVisibility (Visibility .VISIBLE );
6
+ setSize (Size .NORMAL );
7
+ setVisibility (Visibility .VISIBLE );
8
8
}
9
9
10
10
@ Override
Original file line number Diff line number Diff line change @@ -4,10 +4,6 @@ public class InvisibilitySpell extends Command {
4
4
5
5
private Target target ;
6
6
7
- public InvisibilitySpell () {
8
- target = null ;
9
- }
10
-
11
7
@ Override
12
8
public void execute (Target target ) {
13
9
target .setVisibility (Visibility .INVISIBLE );
Original file line number Diff line number Diff line change 3
3
public class ShrinkSpell extends Command {
4
4
5
5
private Size oldSize ;
6
-
7
6
private Target target ;
8
7
9
- public ShrinkSpell () {
10
- oldSize = null ;
11
- target = null ;
12
- }
13
-
14
8
@ Override
15
9
public void execute (Target target ) {
16
10
oldSize = target .getSize ();
Original file line number Diff line number Diff line change @@ -5,9 +5,8 @@ public class Wizard extends Target {
5
5
private Command previousSpell ;
6
6
7
7
public Wizard () {
8
- this .setSize (Size .NORMAL );
9
- this .setVisibility (Visibility .VISIBLE );
10
- previousSpell = null ;
8
+ setSize (Size .NORMAL );
9
+ setVisibility (Visibility .VISIBLE );
11
10
}
12
11
13
12
public void castSpell (Command command , Target target ) {
You can’t perform that action at this time.
0 commit comments