changed PacmanKeyListener to interact with android, added some functions in Main to facilitate this