Sure! Here's a simple game implemented as a single HTML file that meets your requirements. The game is called "Soldier Shootout."
Game Over
To play the game:
1. Copy the above code and save it as "soldier_shootout.html".
2. Open the HTML file in your smartphone's browser.
3. Use the arrow keys to move the soldier (green square) in the building (white rectangle).
4. Press the spacebar to shoot bullets (black squares) at the enemies (red squares) and masks (gray squares).
5. Your goal is to eliminate all enemies on the different floors and collect all masks on the final floor (floor 3).
6. The game ends when you have cleared all enemies on floor 3.
7. The "Game Over" message will be displayed when you complete the game or if an enemy hits you.
8. Enjoy the game!