Ваші коментарі

Hi!

Sorry for answering in English.

Thanks for asking! I used OmniGraffle (sadly, only available on macOS) with heavily customized UML stencils.

The comics were drawn using Inkscape.

Hi!

Yes, you can print one copy for personal use as per the ebook license.

Sorry, I'm still not sure I understand your case. By stacking, I mean that each decorator may affect the outcome of the thing it decorates, and if multiple decorators are stacked together, you get a complex result. For the IsOpen() behavior each decorator would override the true/false result of the previous decorator (which, arguably, makes a little sense).

I could imagine a good case for this if your color decorators stack, and this results into a mixed color from some sort of getColor() method. So, if you have blue, and then yellow, you get the green color in the end (but I'm not sure whether it's what you want). But I have hard time understanding the case where you have color decorators and HasZombie decorator. What is the supposed behavior that is common to both?

If you can explain what you're trying to achieve without mentioning any patterns, that might be a better start of this discussion.

Why do you need Decorators? What do they "decorate"? Do their behaviors stack?

Hi!

Thanks for the idea, I plan to add them eventually.

Hi!

I'll add this to my todo list, thanks!