Sorry I didn't see your message
It is a bit of a copyright minefield, but as long as you don't use the original code, graphics or sound then it should be ok. The code is mine, pacman graphics are not from the original game only thing I had to use is the skins effect from a YouTube site. Here's what the internet says..
Selling a Pac-Man clone is legally risky if it uses any copyrighted or trademarked elements from the original game. However, you can create and sell a game with similar gameplay mechanics if you use entirely original code, art, sounds, and name.