Playing with a Java implementation of the State Design Pattern as described on code-project by thomas_jaeger.