Changed update logic.

Moved update logic to GameState class which is extended by every game
state.