Here's an example of a single HTML file game implementation of Pac-Man using JavaScript and enclosed in script tags:
Pac-Man Game
To play the game, you can copy the above code into a new HTML file, save it with a .html extension, and open it in a web browser. The game-board grid represents the game level, and you can control Pac-Man's movement using the arrow keys on your keyboard. Pac-Man is represented by a pictogram image (pacman.png). Enjoy playing Pac-Man!