Git Product home page Git Product logo

slot-machine's Introduction

Slot Machine

A simple slot machine game written in C++98 in DOS for my grade 11 computer science class.

How it works

The player starts with 1000 coins, spins the wheel for 100 coins each time and is awarded coins when alignments are formed.

When the program is executed, the wheel is spun with each column beginning to spin at a slightly different timing.

Starting screen

Eventually each column stops spinning (again, at slightly different timings).

If none of the symbols align in any row, column or diagonal, the player does not gain any points and the below screen is displayed.

Losing screen

If the user presses ‘y’ (provided the user has at least 100 coins) the wheel is spun again at the cost of 100 coins.

If the user attempts to carry on with the game despite not having enough coins, the game forcefully ends with a “G A M E O V E R” screen.

If ‘n’, the program is quit.

On the other hand if an alignment does occur, all characters turn green and the aligned symbols blink for a while. Subsequently the following screen is displayed:

You won screen

The user is awarded a number of coins depending on the number of alignments formed and the game continues.

slot-machine's People

Contributors

patilatharva avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.