#include <iostream>
using namespace std;
#include "wordDice.h"

// a test program for your WordDice class

// function prototypes
void greeting(int & number);
void fortunes(int count, WordDice & dice);

int main()
{
    int rollCount;
    greeting(rollCount);
    WordDice lucky("testDice.txt");  // create WordDice object
	                              // using the text file that you 
	                              // were given in the assignment
    fortunes(rollCount, lucky);
    return 0;
}

void greeting(int & number)
{
    cout << "Welcome to Fortune Dice, the mystic program" << endl;
    cout <<
	"Please enter the number of fortunes that you would like to receive"
	 << endl;
    cin >> number;
}

void fortunes(int count, WordDice & dice)
{
    for(int k=0; k < count; k++)
    {
	string vision = dice.Roll();
        switch (k%8)
        {
  	  case 0:
	      cout << "You deeply wish to be "
		   << vision << ".\n" << endl;
	      break;
	  case 1:
	      cout << "When asked to write computer programs you feel " 
		   << vision << ".\n" << endl;
	      break;
	  case 2:
	      cout << "Today, I see you as somewhat "
		   << vision << ".\n" << endl;
	      break;
          case 3:
	      cout << "Your mood is also "
		   << vision << ".\n" << endl;
	      break;
          case 4:
	      cout << "Others may suggest that you appear "
		   << vision << ".\n" <<endl;
	      break;
          case 5:
	      cout << "You are mentally strongest when you are "
		   << vision << ".\n" <<endl;
	      break;
          case 6:
	      cout << "Your emotional strength peaks when you feel "
		   << vision << ".\n" <<endl;
	      break;
          case 7:
	      cout << "Be careful when you feel "
		   << vision << ".\n" <<endl;
	      break;
          case 8:
	      cout << "Be wary of friends that say you are "
		   << vision << ".\n" <<endl;
        }
    }
}

