Sure! Here's an example of a sword-fighting marble game implemented as a single HTML file using JavaScript:
This game uses a canvas element to display the game objects (sword and marble) and detects touch or mouse movements to control the sword's position. The marble moves around the screen randomly, and the objective of the game is to prevent the marble from colliding with the sword. If a collision occurs, a "Game Over" alert is displayed, and the game is reset upon dismissal.