@@ -127,7 +127,7 @@ public class App {
127127 // Java 8 functional implementation Strategy pattern
128128 LOGGER . info(GREEN_DRAGON_SPOTTED );
129129 dragonSlayer = new DragonSlayer (
130- () - > LOGGER . info(" With your Excalibur you severe the dragon's head!" ));
130+ () - > LOGGER . info(" With your Excalibur you sever the dragon's head!" ));
131131 dragonSlayer. goToBattle();
132132 LOGGER . info(RED_DRAGON_EMERGES );
133133 dragonSlayer. changeStrategy(() - > LOGGER . info(
@@ -162,13 +162,13 @@ Program output:
16216213:06:36.634 [main] INFO com.iluwatar.strategy.App -- Black dragon lands before you.
16316313:06:36.634 [main] INFO com.iluwatar.strategy.SpellStrategy -- You cast the spell of disintegration and the dragon vaporizes in a pile of dust!
16416413:06:36.634 [main] INFO com.iluwatar.strategy.App -- Green dragon spotted ahead!
165- 13:06:36.634 [main] INFO com.iluwatar.strategy.App -- With your Excalibur you severe the dragon's head!
165+ 13:06:36.634 [main] INFO com.iluwatar.strategy.App -- With your Excalibur you sever the dragon's head!
16616613:06:36.634 [main] INFO com.iluwatar.strategy.App -- Red dragon emerges.
16716713:06:36.635 [main] INFO com.iluwatar.strategy.App -- You shoot the dragon with the magical crossbow and it falls dead on the ground!
16816813:06:36.635 [main] INFO com.iluwatar.strategy.App -- Black dragon lands before you.
16916913:06:36.635 [main] INFO com.iluwatar.strategy.App -- You cast the spell of disintegration and the dragon vaporizes in a pile of dust!
17017013:06:36.635 [main] INFO com.iluwatar.strategy.App -- Green dragon spotted ahead!
171- 13:06:36.637 [main] INFO com.iluwatar.strategy.LambdaStrategy -- With your Excalibur you severe the dragon's head!
171+ 13:06:36.637 [main] INFO com.iluwatar.strategy.LambdaStrategy -- With your Excalibur you sever the dragon's head!
17217213:06:36.637 [main] INFO com.iluwatar.strategy.App -- Red dragon emerges.
17317313:06:36.637 [main] INFO com.iluwatar.strategy.LambdaStrategy -- You shoot the dragon with the magical crossbow and it falls dead on the ground!
17417413:06:36.637 [main] INFO com.iluwatar.strategy.App -- Black dragon lands before you.
0 commit comments