Text Pacman - Source code included! However, if you turn this as homework you'll be sorely disappointed with your grade.
The final project in CSE 143, Spring 1999. Caution to pregnant women and small children: Primitive C++ coding techniques may cause retinal burnout. Download at your own risk.