The memento pattern is a behavioural pattern which allows us to save a particular object's state and restore it at a later date, without the details of that object having to be revealed. This is good because we want our objects and their data to be encapsulated.
This article is going to introduce the design pattern known as the Observer Pattern, but first, let's find out how it applies in a game of magic.
Today's post in the Magic: The Programming series is all about the State pattern.
This post is inspired by a video series I saw on YouTube called PatternCraft, where the author, John Lindquist uses Starcraft as a subject for teaching various programming design patterns. Recently I’ve