Memento Design Pattern
Understand how to implement the Memento design pattern in Kotlin to save an object's internal state securely and restore it later. This lesson teaches you to manage and revert object states effectively using Kotlin's inner classes, helping you maintain consistent behavior in applications requiring state recovery or undo mechanisms.
We'll cover the following...
Let’s imagine we have our little indie company consisting of only me, a canary named Michael that acts as a product manager, and two cat designers that sleep most of the day but produce some decent mockups from time to time.
Now the company has hired more employees that will do the work of QAs, and the rest of the responsibilities and Michael will just manage them.
Since Michael became a manager, it’s been tough to catch him if I have a question. And when I do ask him something, he just throws something and runs to the next meeting. Yesterday, I asked him what new weapon we should introduce in our game. He told me it ...