Sure, I understand your request. Here's an example of a simple sword fight game implemented as a single HTML file with JavaScript.
This example creates a simple sword fight game where a player and an opponent move randomly on the screen. It uses the canvas element to draw the player and opponent using emojis. The update function is responsible for moving the characters and checking for collisions, and the game loop continuously updates and redraws the game screen.
Please note that this is a basic example, and you can extend it further with additional features, such as scoring, health, levels, etc. depending on your requirements.