Here is a simple example of a Mandelbrot fractal game written in a single HTML file using JavaScript:
You can copy this code and save it as an HTML file. When you open it in a browser, you can click on the canvas to explore the Mandelbrot fractal and see the patterns it creates. Feel free to modify the code and add more features to turn it into a fully-fledged game!