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

Thank you for the kind words!

Здравствуйте!

Вы не могли бы сказать, какой это браузер / операционная система? Не могу воспроизвести проблему, к сожалению.

Hi!

You might be right about that! Moreover, I think most patterns violate some of his principles, for example:

Simple is better than complex.
Complex is better than complicated.

Still, for better or worse, the patterns are used universally and not just in the Python world.

Thank you, Daniel! I'm glad that you enjoyed my work!

Hi!

I think the closest thing to what you wanted is the https://gameprogrammingpatterns.com/

I'm not aware of a more game-dev-focused book/resource on patterns.

Hi!

Yes, it's already in my plans (I can't have any time estimates, though).

The code has become more compact, but I don't think there was any improvement in readability. In fact, it becomes harder to grasp what this method is doing because:

1. You now have a break in mental context - you have to travel mentally to methods calcOcKeyNum and addToObject to check what they do (it's still not obvious.)

2. The addToObject method is not self-contained, which makes it even harder to grasp its logic.