Sure! Here's an example of a game called "Ball in a Box" implemented as a single HTML file with JavaScript:
In this game, there will be a ball moving randomly within a box on the canvas. Every 10 seconds, something weird happens, indicated by the message "WEIRDNESS INCOMING". The weirdness can be one of four random commands: "PARTY" changes the background color creating a party effect, "more balls" spawns more balls on the canvas, "why is it raining" starts a rain effect with blue raindrops, and "rainbow ball" changes the color of the ball to a random "rainbow" color.
You can save the above code as an HTML file and open it in a web browser on your smartphone to play the game.