Sure, here's an example of a simple text-based game implemented as a single HTML file using JavaScript:
In this game, you are chased by Gengar, the shadow Pokemon. The game presents you with five choices represented by numbers. You need to enter the corresponding number to choose your action and see the outcome. The result will be displayed in an alert box.
Feel free to modify this code to enhance the game and add pictograms or additional features.