Sure! Here's an example of a game that meets your requirements:
In this game, you control a player character represented by a red square. The enemy character is represented by a blue square. The player can move left or right using the arrow keys or by touching the left or right sides of the game canvas on a smartphone. The player can also attack and change elements by clicking the respective buttons.
If the player collides with the enemy, the game is over and a confirm dialog will ask if they want to reset the game. Choosing "yes" will reload the page and start a new game.
Note: This is a simple example and can be further enhanced with additional game logic, graphics, sound effects, scoring, etc., based on your requirements.