Inspiration

The inspiration behind this project was the movie 007 - Casino Royale, which is my favorite 007 movie. I wanted to try and great a game that brought in the theme of the movie.

What it does

This C++ program essentially mimics a slot machine for the user. It first asks how much money the user has, and then proceeds, on loop, to ask how much the user is willing to risk on their next role. The slot machine then is displayed and the user "pulls the lever" (presses enter) to initiate the roll. Three random numbers form 1 to 10 are then produced and based on those numbers three character "images" are placed into an array to be displayed on the slot machine. The program then checks if the user had won by getting three of the same images to display and tells them the amount they won as the result. Different winnings are given based on the match made.

How we built it

This was built using VS Code IDE and basic C++ programming. I used cout to display text and the image of the slot machine, and used functions like generateRandom() to perform necessary aspects of the program.

Challenges we ran into

The major challenge I ran into was (A) finding a team and (B) figuring out how to create a GUI. I had originally been working with one other hacker, but due to lack of communication and ultimately time constraints he backed out sadly. He was going to create the GUI for the slot machine, so I did not have enough time to essentially start this process after he backed out. The GUI seemed to be more complicated than I had anticipated, and was not able to begin to understand how to create one.

Accomplishments that we're proud of

I am proud that I was able to complete this hack for my first hackathon. It isn't much and I know that, but it is one of my first projects outside of class and my first time participating in a hackathon.

What we learned

The two major things I learned was that sometimes working with others is not always the most straightforward and easiest thing. Communication is key when working with others and being able to adapt is also very essential. I also underestimated how hard GUIs are to implement given the knowledge I have as a beginner.

What's next for Casino Royale - Slot Machine

The next steps for this build are to create that GUI to be honest. I still really want to learn how to make a functioning one and feel it will add a lot to the program.

Built With

  • c++
  • randomnumbergenerator
  • vscode
Share this project:

Updates