Sure, here's a simple game that meets your requirements:
Merge Game
In this game, you start with 100 coins and the goal is to buy and merge blue things. Each blue thing costs 10 coins. Once you have 10 blue things, you can merge them into a single blue thing. When you click on the blue thing, the mergeBlueThings function is triggered. However, if you don't have enough blue things, an alert message will be displayed. The current number of coins and blue things will be displayed on the page.
Note: This implementation is very basic and serves as a starting point. You can further enhance the game by adding more features, levels, animations, and graphics as per your requirements.