Sure! Here's an example of a simple game using JavaScript and displayed within a single HTML file:
In this game, you can control a smiley block using the arrow keys on your smartphone. The aim is to navigate the block within the game container. The smiley block will move up, down, left, or right based on the key presses, and it cannot move beyond the boundaries of the game container. The smiley block image is displayed using CSS.