Image

Test Your Luck!

May 2024

A slot machine in C++! I want to make a program that simulates a slot machine where the user has a set amount of money and can play. It will use the very basic rule of getting three in a row to win using rand to randomize the chances of each row. The output will be a simple 2D array and will constantly update the user's amount with the option of betting more or less.

Why a slot machine?

Well, I do occasionally like to play slots IRL. This spring (2024), I had to retake Data Structures because Chapman wouldn't allow my community college credit to transfer. Therefore, I re-upped my knowledge of C++ and got a better understanding of algorithms and data structures. With this better understanding, I had to make my own project in my free time. I felt like a slot machine would give me a lot of backend practice. Since I am only creating a 1-row and 3-column machine, the logic of winning is extremely simple. I didn't want to overwhelm myself from the start, as I had recently realized that I can do that sometimes when starting a project that is solely coding-based.

GitHub Repository

#C++