Sure! Here's a simple implementation of the game you described in a single HTML file using JavaScript:
Green Square Game
Score: 0
Copy and paste the above code into a new HTML file (e.g., `game.html`) and open it in a web browser. You should see a game where you control a blue square using the arrow keys, and a green square moves from right to left on the screen. If the green square collides with the player, you lose and get an alert. If you score 10 points by clicking on the green square, you win and get an alert as well.
Note: This is a very basic implementation to get you started. You can further enhance the game by adding more features like levels, sound effects, and animations.