I added scratch cards to my online casino!
I spent a whopping 15 minutes creating a scratch off game and adding it to my online casino. I know what you might be thinking, can I make a ton of money?
The answer is a "sorry, no". In short, it's not a casino yet. But it's getting there. Here's how I created the game
The idea
First, I needed an idea. I'm not very inventive so I asked Copilot. "Can you give me some ideas to add a game to my online casino?" One of its ideas was a scratch card. So, I put Copilot to work in creating the game.
Building the game
I knew from my Tic-Tac-Toe game that I didn't want to leave the mechanics to chance or Microsoft Copilot, so this time I was pretty specific with what I wanted. But I wasn't sure how the winning would be. I haven't played any scratch offs in a while, but I remember there was a few different ways. I knew the most common way was "if you get $X so many times you win" but I wasn't sure if that was the best bet in my online casino. I basically let Copilot decide by not putting that part in my original prompt.
"Please create a web-based scratch off game. The player will go to a webpage and see a scratch off card. The user can then click each square in the scratch off to reveal what's underneath. After the user scratches each square a message should appear saying they won or loss. Once they click OK in the message a new game will start. Please create the HTML, CSS, and JavaScript for the game.
"Please create a web-based scratch off game. The player will go to a webpage and see a scratch off card. The user can then click each square in the scratch off to reveal what's underneath. After the user scratches each square a message should appear saying they won or loss. Once they click OK in the message a new game will start. Please create the HTML, CSS, and JavaScript for the game."
The first pass it basically had the scratcher always winning because all they had to do was scratch three 💰
icons and they won. But how it designed it they would always scratch three. So I asked Copilot to redesign the game with a "three in a row" idea for winning. In the end I used this prompt:
"Please create a web-based scratch off game. The player will go to a webpage and see a scratch off card. The user can then click each square in the scratch off to reveal what's underneath. After the user scratches each square a message should appear saying they won or loss. A win should only happen if there are three winning squares in a row. If they aren't in a row, they should lose. Once they click OK in the message a new game will start. Please create the HTML, CSS, and JavaScript for the game."
That worked beautifully. I copied and pasted the JS, HTML, and CSS into their respective files and bada-bing boda-boom. Then I tested. It took about ten scratches for me to win. I'm not 100% sure the chances of winning right now, but I don't actually have any winnings I need to pay out... Yet!