'State' Design Pattern from the Gang of Four book