Blog Overview

This blog, Creative Innovationz, serves as a portfolio of computer science related projects and work that I have participated in and completed. While some of the projects mentioned throughout this blog were done as group projects, I am still knowledgeable of the information.

Tuesday, December 28, 2010

Simulation of a Casino Slot Machine Game


In my Introduction to Microprocessors class my group and I was given a project in our lab to simulate a Casino Slot Machine Game. The slot machine was programmed using Code Warrior Software in assembler language. We used a MCU Projectboard with a MC9S12DT256B Microprocessor and a Freescale 'S12 Microcontroller Module to execute the program downloaded from the PC for demonstration.

Project Algorithm

Input: Prompt the user to place a bet (push button 1 of 4), one monetary unit is added at a time.
Processes: Check to see if the cash reserve is greater than the bet placed if so pull the lever (push button 1 of 4) to randomly generate numbers on each of the three wheels. If cash reserve is not greater than the bet placed, the game forces you to re-place a bet. Then pull the lever to randomly generate numbers on each of the three wheels. If the three wheels align to the jackpot value increment monetary units placed in the bet from the cash reserve. If the three wheels don’t align to the jackpot value then decrement the monetary units placed in the bet from the cash reserve.
Output: Display the randomly generated number for each wheel. If the cashing out (push button 1 of 4) is pressed then display the value of the cash reserve.

No comments:

Post a Comment