Improved Command pattern code comments.

This commit is contained in:
Ilkka Seppala
2014-12-27 11:11:54 +02:00
parent 74b43303e3
commit 22ca6fef60
5 changed files with 19 additions and 4 deletions

View File

@ -2,8 +2,9 @@ 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.
*
* In this example the commands are the spells cast by the wizard on the goblin.
*
*/
public class App {

View File

@ -2,7 +2,7 @@ package com.iluwatar;
/**
*
* Interface for spells.
* Interface for Commands.
*
*/
public abstract class Command {

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* Enumeration for target size.
*
*/
public enum Size {
SMALL, NORMAL, LARGE;
@ -24,5 +29,4 @@ public enum Size {
}
return s;
}
}

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* Base class for spell targets.
*
*/
public abstract class Target {
private Size size;

View File

@ -1,5 +1,10 @@
package com.iluwatar;
/**
*
* Enumeration for target visibility.
*
*/
public enum Visibility {
VISIBLE, INVISIBLE;