Sure! Here's an example of a simple Pac-Man game implemented as a single HTML file using JavaScript:
To play the game, open the HTML file in a web browser (preferably on a smartphone for better touch-based controls). The Pac-Man character will appear on the screen, and you can control its movement using the arrow keys or by swiping on a smartphone screen. The game will continuously move the Pac-Man character every 200ms based on the chosen direction.