extended and clean code GameStateTest.java