mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-03 20:13:10 +00:00
Just formatting App classes to be like the other class files on the project
This commit is contained in:
1 parent
52f0923df9
commit
bde5b343d0
24 files changed
+466
-508
No files matched your search
@@ -1,27 +1,25 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* In Command pattern actions are objects that can
|
||||
* be executed and undone. The commands in this example
|
||||
* are spells cast by the wizard on the goblin.
|
||||
*
|
||||
* In Command pattern actions are objects that can be executed and undone. The
|
||||
* commands in this example are spells cast by the wizard on the goblin.
|
||||
*
|
||||
*/
|
||||
public class App
|
||||
{
|
||||
public static void main( String[] args )
|
||||
{
|
||||
Wizard wizard = new Wizard();
|
||||
Goblin goblin = new Goblin();
|
||||
public class App {
|
||||
|
||||
goblin.printStatus();
|
||||
|
||||
wizard.castSpell(new ShrinkSpell(), goblin);
|
||||
goblin.printStatus();
|
||||
|
||||
wizard.castSpell(new InvisibilitySpell(), goblin);
|
||||
goblin.printStatus();
|
||||
wizard.undoLastSpell();
|
||||
goblin.printStatus();
|
||||
public static void main(String[] args) {
|
||||
Wizard wizard = new Wizard();
|
||||
Goblin goblin = new Goblin();
|
||||
|
||||
goblin.printStatus();
|
||||
|
||||
wizard.castSpell(new ShrinkSpell(), goblin);
|
||||
goblin.printStatus();
|
||||
|
||||
wizard.castSpell(new InvisibilitySpell(), goblin);
|
||||
goblin.printStatus();
|
||||
wizard.undoLastSpell();
|
||||
goblin.printStatus();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user