A demo of the State design pattern