Code for pacman project