Extracting a single protocol

Let's take a look at how to extract a single protocol:

protocol CardReaderState {
func perform(context: CardReader)
}

Next, we need to implement all our states as structs or classes, preferring singletons if possible. Let's use structs for this example.