Sure, here is a simple example of a Pac-Man game implemented in a single HTML file with JavaScript:
This code creates a simple Pac-Man character that opens and closes its mouth, giving the illusion of movement. You can further enhance the game by adding enemies, pellets, and walls, but this should give you a starting point for creating a Pac-Man game.