Sure, here's an implementation of the game you described as a single HTML file with JavaScript enclosed in script tags:
Please note that this implementation is a basic version of the game and may require additional enhancements and optimizations based on specific requirements or preferences.