Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
clintaire committed Jan 13, 2025
2 parents 0b0c205 + 07c82e4 commit 6f96d31
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 8 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -3366,6 +3366,15 @@
"contributions": [
"code"
]
},
{
"login": "mehdirahimi",
"name": "Mehdi Rahimi",
"avatar_url": "https://avatars.githubusercontent.com/u/24210842?v=4",
"profile": "https://mehdirahimi.github.io",
"contributions": [
"code"
]
}
],
"contributorsPerLine": 6,
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=iluwatar_java-design-patterns&metric=coverage)](https://sonarcloud.io/dashboard?id=iluwatar_java-design-patterns)
[![Join the chat at https://gitter.im/iluwatar/java-design-patterns](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/iluwatar/java-design-patterns?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-369-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-370-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

<br/>
Expand Down Expand Up @@ -552,6 +552,7 @@ This project is licensed under the terms of the MIT license.
<td align="center" valign="top" width="16.66%"><a href="https://github.com/depthlending"><img src="https://avatars.githubusercontent.com/u/164312726?v=4?s=100" width="100px;" alt="BiKangNing"/><br /><sub><b>BiKangNing</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=depthlending" title="Documentation">📖</a></td>
<td align="center" valign="top" width="16.66%"><a href="https://github.com/TarunVishwakarma1"><img src="https://avatars.githubusercontent.com/u/138651451?v=4?s=100" width="100px;" alt="Tarun Vishwakarma"/><br /><sub><b>Tarun Vishwakarma</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=TarunVishwakarma1" title="Code">💻</a></td>
<td align="center" valign="top" width="16.66%"><a href="https://github.com/shahdhoss"><img src="https://avatars.githubusercontent.com/u/132148556?v=4?s=100" width="100px;" alt="Shahd Hossam"/><br /><sub><b>Shahd Hossam</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=shahdhoss" title="Code">💻</a></td>
<td align="center" valign="top" width="16.66%"><a href="https://mehdirahimi.github.io"><img src="https://avatars.githubusercontent.com/u/24210842?v=4?s=100" width="100px;" alt="Mehdi Rahimi"/><br /><sub><b>Mehdi Rahimi</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=mehdirahimi" title="Code">💻</a></td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 1 addition & 1 deletion localization/es/strategy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public class LambdaStrategy {

public enum Strategy implements DragonSlayingStrategy {
MeleeStrategy(() -> LOGGER.info(
"With your Excalibur you severe the dragon's head!")),
"With your Excalibur you sever the dragon's head!")),
ProjectileStrategy(() -> LOGGER.info(
"You shoot the dragon with the magical crossbow and it falls dead on the ground!")),
SpellStrategy(() -> LOGGER.info(
Expand Down
2 changes: 1 addition & 1 deletion localization/ko/strategy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public class LambdaStrategy {

public enum Strategy implements DragonSlayingStrategy {
MeleeStrategy(() -> LOGGER.info(
"With your Excalibur you severe the dragon's head!")),
"With your Excalibur you sever the dragon's head!")),
ProjectileStrategy(() -> LOGGER.info(
"You shoot the dragon with the magical crossbow and it falls dead on the ground!")),
SpellStrategy(() -> LOGGER.info(
Expand Down
6 changes: 3 additions & 3 deletions strategy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public class App {
// Java 8 functional implementation Strategy pattern
LOGGER.info(GREEN_DRAGON_SPOTTED);
dragonSlayer = new DragonSlayer(
() -> LOGGER.info("With your Excalibur you severe the dragon's head!"));
() -> LOGGER.info("With your Excalibur you sever the dragon's head!"));
dragonSlayer.goToBattle();
LOGGER.info(RED_DRAGON_EMERGES);
dragonSlayer.changeStrategy(() -> LOGGER.info(
Expand Down Expand Up @@ -162,13 +162,13 @@ Program output:
13:06:36.634 [main] INFO com.iluwatar.strategy.App -- Black dragon lands before you.
13:06:36.634 [main] INFO com.iluwatar.strategy.SpellStrategy -- You cast the spell of disintegration and the dragon vaporizes in a pile of dust!
13:06:36.634 [main] INFO com.iluwatar.strategy.App -- Green dragon spotted ahead!
13:06:36.634 [main] INFO com.iluwatar.strategy.App -- With your Excalibur you severe the dragon's head!
13:06:36.634 [main] INFO com.iluwatar.strategy.App -- With your Excalibur you sever the dragon's head!
13:06:36.634 [main] INFO com.iluwatar.strategy.App -- Red dragon emerges.
13:06:36.635 [main] INFO com.iluwatar.strategy.App -- You shoot the dragon with the magical crossbow and it falls dead on the ground!
13:06:36.635 [main] INFO com.iluwatar.strategy.App -- Black dragon lands before you.
13:06:36.635 [main] INFO com.iluwatar.strategy.App -- You cast the spell of disintegration and the dragon vaporizes in a pile of dust!
13:06:36.635 [main] INFO com.iluwatar.strategy.App -- Green dragon spotted ahead!
13:06:36.637 [main] INFO com.iluwatar.strategy.LambdaStrategy -- With your Excalibur you severe the dragon's head!
13:06:36.637 [main] INFO com.iluwatar.strategy.LambdaStrategy -- With your Excalibur you sever the dragon's head!
13:06:36.637 [main] INFO com.iluwatar.strategy.App -- Red dragon emerges.
13:06:36.637 [main] INFO com.iluwatar.strategy.LambdaStrategy -- You shoot the dragon with the magical crossbow and it falls dead on the ground!
13:06:36.637 [main] INFO com.iluwatar.strategy.App -- Black dragon lands before you.
Expand Down
2 changes: 1 addition & 1 deletion strategy/src/main/java/com/iluwatar/strategy/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public static void main(String[] args) {
// Java 8 functional implementation Strategy pattern
LOGGER.info(GREEN_DRAGON_SPOTTED);
dragonSlayer = new DragonSlayer(
() -> LOGGER.info("With your Excalibur you severe the dragon's head!"));
() -> LOGGER.info("With your Excalibur you sever the dragon's head!"));
dragonSlayer.goToBattle();
LOGGER.info(RED_DRAGON_EMERGES);
dragonSlayer.changeStrategy(() -> LOGGER.info(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class LambdaStrategy {
*/
public enum Strategy implements DragonSlayingStrategy {
MELEE_STRATEGY(() -> LOGGER.info(
"With your Excalibur you severe the dragon's head!")),
"With your Excalibur you sever the dragon's head!")),
PROJECTILE_STRATEGY(() -> LOGGER.info(
"You shoot the dragon with the magical crossbow and it falls dead on the ground!")),
SPELL_STRATEGY(() -> LOGGER.info(
Expand Down

0 comments on commit 6f96d31

Please sign in to comment.