Sure, here's an example of a simplified Pac-Man game implemented as a single HTML file using JavaScript and enclosed within script tags:
This implementation creates a game board, places the Pac-Man and fruit elements on the board, and allows the player to control Pac-Man using arrow keys. When Pac-Man reaches the fruit, an alert is displayed to indicate the end of the game, and a new game is created. The game utilizes simple CSS to display the game components visually.
Please note that this is a basic implementation and does not include full game logic or advanced features found in the original Pac-Man game.