You can think of the State design pattern as an opinionated Strategy, which we discuss at the beginning of this chapter. But while Strategy is changed from the outside, by the client, the State may change internally, based solely on the input it gets.
Look at this dialog a client wrote with Strategy:
Client: Here’s a new thing to do, start doing it from now on.
Strategy: OK, no problem.
Client: What I like about you is that you never argue with me.
Compare it with this one:
Client: Here’s some new input I got from you.
State: Oh, I don't know. Maybe I'll start doing something differently. Maybe not.
The client should also expect that the State may even reject some of its inputs:
Client: Here's something for you to ponder, State.
State: I don't know what it is! Don't you see I'm busy? Go bother some Strategy with this!
So, why do...