This was a 5-day project for a job entreview, I tried to make the code somewhat clear but if you need some help feel free contact me. Some details in the game are not fine-tuned to mimic the original perfectly.
I used information from:
-http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-behavior
-http://www.gamasutra.com/view/feature/3938/the_pacman_dossier.php?print=1
And inspired my work in: