added health bar to the game logic