Skip to content

Commit

Permalink
- Assign ClubberTroll to another variable in README
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangNam committed Oct 15, 2018
1 parent 86e9c66 commit b3f0cc7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions decorator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ troll.attack(); // The troll tries to grab you!
troll.fleeBattle(); // The troll shrieks in horror and runs away!

// change the behavior of the simple troll by adding a decorator
troll = new ClubbedTroll(troll);
troll.attack(); // The troll tries to grab you! The troll swings at you with a club!
troll.fleeBattle(); // The troll shrieks in horror and runs away!
Troll clubbedTroll = new ClubbedTroll(troll);
clubbedTroll.attack(); // The troll tries to grab you! The troll swings at you with a club!
clubbedTroll.fleeBattle(); // The troll shrieks in horror and runs away!
```

## Applicability
Expand Down

0 comments on commit b3f0cc7

Please sign in to comment.