http://www.java-forums.org/java-gaming/71378-state-machine-pattern-games.html