Cleanup code
This commit is contained in:
		@@ -75,19 +75,18 @@ public class Wizard {
 | 
			
		||||
Next we present the spell hierarchy.
 | 
			
		||||
 | 
			
		||||
```java
 | 
			
		||||
public abstract class Command {
 | 
			
		||||
public interface Command {
 | 
			
		||||
 | 
			
		||||
  public abstract void execute(Target target);
 | 
			
		||||
  void execute(Target target);
 | 
			
		||||
 | 
			
		||||
  public abstract void undo();
 | 
			
		||||
  void undo();
 | 
			
		||||
 | 
			
		||||
  public abstract void redo();
 | 
			
		||||
  void redo();
 | 
			
		||||
 | 
			
		||||
  @Override
 | 
			
		||||
  public abstract String toString();
 | 
			
		||||
  String toString();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
public class InvisibilitySpell extends Command {
 | 
			
		||||
public class InvisibilitySpell implements Command {
 | 
			
		||||
 | 
			
		||||
  private Target target;
 | 
			
		||||
 | 
			
		||||
@@ -117,7 +116,7 @@ public class InvisibilitySpell extends Command {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
public class ShrinkSpell extends Command {
 | 
			
		||||
public class ShrinkSpell implements Command {
 | 
			
		||||
 | 
			
		||||
  private Size oldSize;
 | 
			
		||||
  private Target target;
 | 
			
		||||
 
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 75 KiB  | 
@@ -4,7 +4,7 @@ package com.iluwatar.command {
 | 
			
		||||
    + App()
 | 
			
		||||
    + main(args : String[]) {static}
 | 
			
		||||
  }
 | 
			
		||||
  abstract class Command {
 | 
			
		||||
  interface Command {
 | 
			
		||||
    + Command()
 | 
			
		||||
    + execute(Target) {abstract}
 | 
			
		||||
    + redo() {abstract}
 | 
			
		||||
@@ -77,7 +77,7 @@ ShrinkSpell -->  "-oldSize" Size
 | 
			
		||||
InvisibilitySpell -->  "-target" Target
 | 
			
		||||
ShrinkSpell -->  "-target" Target
 | 
			
		||||
Target -->  "-visibility" Visibility
 | 
			
		||||
Goblin --|> Target 
 | 
			
		||||
InvisibilitySpell --|> Command 
 | 
			
		||||
ShrinkSpell --|> Command 
 | 
			
		||||
@enduml
 | 
			
		||||
Goblin --|> Target
 | 
			
		||||
InvisibilitySpell ..|> Command
 | 
			
		||||
ShrinkSpell ..|> Command
 | 
			
		||||
@enduml
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user