I can't seem to get the wheels to display the random number could I get some input on this please
CODE
//Specification: This program simulates a three
//wheeled slot machine. Each wheel will randomly
//display three numbers. When the numbers on the
//wheels match the user is awarded points. The Slot
//machine requires the user to enter tokens to play.
#include <iostream>
#include <ctime>
using namespace std;
class slotMachine {
private:
int wheelA;
int wheelB;
int wheelC;
double payOut; //amount of $ won during the current turn
double moneyInMachine; //total amount of $ in the machine
double playersBalance; //the amount of $ not yet played
double gameCost; //the cost of one pull
double moneyPaid; //the money put in by user
public:
//prototypes
slotMachine();
bool displayMenu(void);
bool pullHandle(void);
void spinWheel(int &);
double calculatePayout();
void insertCoin(double );
void displaySpinResults();
int Random(int, int);
void displayTotals();
};
int main(void) {
//create a slot machine object
slotMachine mySlot;
//Start the slot machine game
//Keep running until the user
//decides to quit
bool ok = true;
while (ok){
ok = mySlot.displayMenu();
};
return 0;
}
slotMachine::slotMachine () {
//constructor, set the initial state
//of all the properties
srand((int) time(0));
moneyInMachine = 100;
moneyPaid = 0;
payOut = 0;
wheelA = 0;
wheelB = 0;
wheelC = 0;
gameCost = 1;
}
bool slotMachine::displayMenu(void){
//main menu, executes the command selected by the
//user or returns a value to terminate game execution
char choice = 'Z';
bool continueGame = true;
cout << "\n\n(E)nd, (P)ull, P(A)Y, (T)otals :";
cin >> choice;
switch (choice) {
case 'e':
case 'E': //stop game
continueGame = false;
break;
case 'a':
case 'A': //pay
double money;
cout << "\nIt's a dollar a pull!\n"
<< "Put money into the machine $";
cin >> money;
insertCoin(money);
break;
case 'p':
case 'P': //pull
if (pullHandle()){
cout << endl << endl << endl;
displaySpinResults();
cout << "Payout $" << calculatePayout();
}
break;
case 't':
case 'T': //display totals
displayTotals();
break;
}
return continueGame;
}
bool slotMachine::pullHandle(void){
//checks to see if there is enough user money
//for a spin. If so, assigns a random value
//to each wheel. Deducts the cost of one
//pull from the users money.
//returns true if the handle was pulled.
//returns false if the handle could not be pulled
double moneyInMachine = 100;
if (moneyInMachine >= gameCost){
moneyInMachine = moneyInMachine - moneyPaid;
cout << "You have \n" << moneyInMachine << endl;
return true;
}
else (moneyInMachine < gameCost);
cout << "You Must Insert More Money";
return false;
}
void slotMachine::spinWheel(int &theWheel){
//assign a random value to a wheel
theWheel = Random(1,3);
}
double slotMachine::calculatePayout(){
//decides if the current wheel values merit a
//payout and how much that payout should be.
//deducts the total payout from the total
//amount of money in the machine
int jackPot = 1000;
int goodJob = 10;
int youLose = -5;
if (wheelA == wheelB && wheelA == wheelC)
{
cout << "Jackpot!!! " << jackPot << endl;
}
else (wheelA == wheelB || wheelA == wheelC || wheelB == wheelC);
{
cout << "Good Job " << goodJob << endl;
moneyInMachine = moneyInMachine + jackPot;
moneyInMachine = moneyInMachine + goodJob;
}
return moneyInMachine;
}
void slotMachine::insertCoin(double amount = 0){
//adds to the amount of money paid by the user
//adds to the total money in the machine
int moneyInMachine = 100;
int moneyPaid = 0;
moneyInMachine = moneyPaid + moneyInMachine;
}
void slotMachine::displaySpinResults(){
//displays the value of the three wheels
cout << "[" << wheelA << "] "
<< "[" << wheelB << "] "
<< "[" << wheelC << "] \n\n";
}
void slotMachine::displayTotals(){
//displays the amount of money and number
// of pulls the player has left
cout << "\nMoney in Machine $" << slotMachine::moneyInMachine << endl;
cout << "Pulls Left: " << slotMachine::moneyPaid / slotMachine::gameCost << endl << endl;
}
int slotMachine::Random(int lowerLimit, int upperLimit) {
//returns a random number within the given boundary
return 1 + rand() % (upperLimit - lowerLimit + 1);
}