Sure, here's an example of a simple game implemented as a single HTML file with JavaScript:
This code creates a simple game where a blue circle (player) is displayed on the canvas. The player can be moved using arrow keys. The game loop calls the update function repeatedly to redraw the player on the canvas. You can add more features and functionalities to make it a fully functional game.