update game logic and ui