Sure! Here's an example of a simple text-based game implemented as a single HTML file using JavaScript:
In this game, the player is trapped in a mansion infested with a mutant rat. The objective is to find fire and kill the rat to win the game. The player can choose between looking for fire or trying to find an exit. If the player successfully finds fire and chooses to find an exit, they escape the mansion and win the game. However, if the player doesn't have fire or makes an invalid choice, the rat kills them, resulting in game over.
Note that this is a very basic example and can be further enhanced with visual elements and graphics to make it more engaging.