Improved comments for strategy pattern sample.
This commit is contained in:
parent
27a27594f4
commit
991653062d
@ -2,7 +2,7 @@ package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Strategy (DragonSlayingStrategy) encapsulates the algorithm to use. The
|
||||
* Strategy (DragonSlayingStrategy) encapsulates an algorithm. The containing
|
||||
* object (DragonSlayer) can alter its behavior by changing its strategy.
|
||||
*
|
||||
*/
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Melee strategy.
|
||||
*
|
||||
*/
|
||||
public class MeleeStrategy implements DragonSlayingStrategy {
|
||||
|
||||
@Override
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Projectile strategy.
|
||||
*
|
||||
*/
|
||||
public class ProjectileStrategy implements DragonSlayingStrategy {
|
||||
|
||||
@Override
|
||||
|
@ -1,5 +1,10 @@
|
||||
package com.iluwatar;
|
||||
|
||||
/**
|
||||
*
|
||||
* Spell strategy.
|
||||
*
|
||||
*/
|
||||
public class SpellStrategy implements DragonSlayingStrategy {
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user