easteregg Leprechaun
  • Patrick Collins
    • Home
    • Blog
      • eJPTv1 Certification
      • Conferences

      • Blog Home
    • Travel Photos
    • Notes
    • Graduation!
    • Projects and University Work
      • Honours Project
      • Web App Pen Test

      • All projects
    • Socials
    • About Me

    Slot Machine

    Slot Machine Symbols Pattern

    About

    • Module: CMP104
    • Title: Programming with C++
    • Grade: A

    Below is a demonstration of my slot machine. Give it a wee watch.

    Your browser does not support the video tag.

    I'm very happy with how this program turned out. It was my first major program after learning C++ for around 3 months. I had no programming experience before starting University, so when my first assignment was to make a slot machine I was understandably concerned. I had immense difficulty getting the slots rotating and stopping each rotor. However, once I overcame this obstacle and everything clicked it was very fun designing the interface with LaMothe Code. I decided a Lucky Slots theme was the only way to go 😁.

    Gameplay

    When beginning, you start with 20 gold and it costs 10 gold to spin the slots. If you fail twice in a row then you're outta luck and have to restart the game.

      Prizes:
    • Jackpot: 100 gold (Getting all characters the same)
    • Mini Jackpot: 50 gold (Getting 3 characters the same)
      Losing:
    • You lose if you don't get 3 or all characters the same.
    • An encouraging message will display if the player loses.
    • You can replay if you have enough gold, if not a lovely shamrock End Game message will display.

    <> Code

    If you would like to check out the code, or download and play yourself to try your luck, have a look at its repository below.

    Please DO NOT plagiarise my code. You will be caught, it's not worth it.

    Project's Github Repository

    CMP104 Slot Machine

    C++ program to play slots, are you lucky enough?


    Copyright © 2022-2025 Patrick Collins
    Contact Me: Contact@paddylonglegs.site
    Background created by freepik