Slotts.h
// Programmer: Clayton Price date: 4/9/19
// File: slotts.h
// Purpose: This file contains the global constants and prototypes for the
// functions used int he slotts simulation program.
#ifndef SLOTTS_H
#define SLOTTS_H
#include <iostream>
#include <cstdlib>
using namespace std;
// The following are constants for the program
const short NO_MATCH_LOSS = 5; // lose $5 for no matches
const short ONE_MATCH_WIN = 1; // win $1 for one match
const short TWO_MATCH_WIN = 30; // win $30 for two matches
const float INIT_GAME_BAL = 0; // starting game balance
const short NUM_SIDES = 4; // number of sides on each reel of slot
const int MIN_INITIAL_BAL = 200; // these must be int type for the random
const int MAX_INITIAL_BAL = 1000; // assigning of initial bal to work
const float MAX_TOLLERANCE = 0; // max amount of money moe can stand to lose during a game
const int MIN_CHEAT_SPINS = 5; // num of spins after which cheat starts
// This function outputs message of welcome to users.
// Pre: none.
// Post: message output to the screen welcoming user.
void welcome();
// This function outputs message of farewell to users.
// Pre: none.
// Post: message output to the screen.
void goodbyes();
// This function will present a menu to the user and return a valid choice
// Pre: none.
// Post: menu is presented to user and only a valid char is returned.
char present_menu();
// The establish_bankBalance function will randomly give the player a bank balance
// between and including MIN_INITIAL_BAL and MAX_INITIAL_BAL, set first_time
// to false, set bank_bal_checked to true.
// Pre: none.
// Post: The bank_bal is set between and including MIN_INITIAL_BAL and MAX_INITIAL_BAL
// bank_bal_checked is true (ref var), first_time is set false (ref var).
void establish_bankBalance(bool & first_time,bool & bal_checked,float &
bank_balance);
// The show_balances function will display to the scree the game balance and
// the bank balance.
// Pre: none.
// Post: bank and game balances are displayed to the screen.
void show_balances(const float game_bal,const float bank_bal);
// The transfer function will query the user for an amount of money to transfer
// and deduct a proper amount from the bank balance and add that to the game
// balance and sets funds_trasnferred to true.
// Pre: none.
// Post: valid transfer amount entered by user is deducted from bank bal (ref
// var) and added to the game bal (ref var). funds_transferred is now true.
void transfer(bool & funds_transferred,float & bank_bal,float & game_bal);
// The play game function will play the slots for the user based on how much
// money he/she has in the game.
// Pre: none.
// Post: The player's game_bal will be increased or decreased according to
// winnings or losses.
void play_game(float & game_bal);
// The cheat function will return via ref parameters the values of tumblers 2
// and 3 based on the value of tumbler 1. Their values will be such that no
// match is possible.
// Pre: none.
// Post: values for tumblers 2 and 3 are established for these ref variables
// based on the value of tumbler 1.
void cheat(const short tum1, short & tum2, short & tum3);
#endif