Sure, here's a simplified version of the Plants vs. Zombies game implemented as a single HTML file using JavaScript:
To play the game, open the HTML file in a web browser (preferably on a smartphone). The player can use the left and right arrow keys to move the character (represented as a green square) and avoid the falling zombies (represented as red squares). The goal is to survive as long as possible and achieve a high score. Once the player collides with a zombie, the game is over, and the final score is displayed in an alert message.