Sure, here's an example of a Pac-Man style game where you are chased by clowns, implemented as a single HTML file:
This code sets up a game board where you control the yellow player icon using touch events on a smartphone. The red clown icons will randomly move around the board, and if the player collides with any of the clowns, the game ends and the score is displayed. To play the game, you can simply copy and paste the code into a single HTML file and open it on a web browser on your smartphone. Enjoy!