Credits: https://github.com/daleharvey/pacman