Skip to content

Commit 9916530

Browse files
committed
Improved comments for strategy pattern sample.
1 parent 27a2759 commit 9916530

File tree

4 files changed

+16
-1
lines changed

4 files changed

+16
-1
lines changed

strategy/src/main/java/com/iluwatar/App.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
*
5-
* Strategy (DragonSlayingStrategy) encapsulates the algorithm to use. The
5+
* Strategy (DragonSlayingStrategy) encapsulates an algorithm. The containing
66
* object (DragonSlayer) can alter its behavior by changing its strategy.
77
*
88
*/

strategy/src/main/java/com/iluwatar/MeleeStrategy.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* Melee strategy.
6+
*
7+
*/
38
public class MeleeStrategy implements DragonSlayingStrategy {
49

510
@Override

strategy/src/main/java/com/iluwatar/ProjectileStrategy.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* Projectile strategy.
6+
*
7+
*/
38
public class ProjectileStrategy implements DragonSlayingStrategy {
49

510
@Override

strategy/src/main/java/com/iluwatar/SpellStrategy.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
package com.iluwatar;
22

3+
/**
4+
*
5+
* Spell strategy.
6+
*
7+
*/
38
public class SpellStrategy implements DragonSlayingStrategy {
49

510
@Override

0 commit comments

Comments
 (0)