Added pacman life management and end game detection