/*

Play Rock/Scissors/paper

Input:
	playerChoice (char)

Processing:
	winner
	
Output:
	computerChoice (char)
	playerWins (number of times the player wins game)
	computerWins (number of times the computer wins)
	draws
	totalGames
	
Algorithm:
	giveDirections( )
	
	playerChoice = getPlayerInput( )
	computerChoice = getComputerChoice( )
	while (playerChoice != 'Q')
	{
		computer makes choice
		
		determine winner
	
		if (winner == PLAYER)
		{
			playerWins++;
			display congratulations
		}
		else if (winner == COMPUTER)
		{
			computerWins++;
			display "Sorry you lost this one"
		}
		else
		{
			draws++;
		}
		totalGames++;
		player makes choice again
	}
	display playerWins
	display computerWins
	display draws
	display totalGames
	
*/
// J David Eisenberg
// 03 Dec 07

#include <iostream>
#include <cstdlib>
#include <ctime>
#include <string>
// These includes let us work with vectors:
#include <vector>
#include <algorithm>

// This include lets us read and write files:
#include <fstream>

using namespace std;

/*
	This is a global type -- it is defined outside
	of a function, so it is available to *all* functions
*/
enum winnerType = {PLAYER, COMPUTER, DRAW};

int main()
{
	winnerType winner;
	
	// declare variables
	giveDirections( )
	
	playerChoice = getPlayerInput( )
	while (playerChoice != 'Q')
	{
		computerChoice = getComputerChoice( );
		
		winner = determineWinner( playerChoice,
			computerChoice );
	
		if (winner == PLAYER)
		{
			playerWins++;
			display congratulations
		}
		else if (winner == COMPUTER)
		{
			computerWins++;
			display "Sorry you lost this one"
		}
		else
		{
			draws++;
		}
		totalGames++;
		player makes choice again
	}
	display playerWins
	display computerWins
	display draws
	display totalGames

	system("PAUSE");
	return 0;	
	
}

void giveDirections( )
{
	// you figure this one out
}

/*
	do
	{
		input a character
		convert to upper case
		if (character != R or S or P or Q)
		{
			give an error message
		}
	} while (character != R or S or P or Q);
	return character
	[note: "or" is English; you will need && in C++]
*/
char getPlayerInput( )
{
}

/*
	char choice = ' ';
	set r to a random number from 0..2
	switch (r)
	{
		0: choice = 'R'
		1: choice = 'S'
		2: choice = 'P'
	}
	return choice
*/
char getComputerChoice( )
{
}

/*
	winnerType theWinner;
	if (player == computer)
	{
		theWinner = DRAW;
	}
	else if ( player=='R'/computer=='S' OR/AND???
		player=='S'/computer=='P' OR/AND???
		player=='P'/computer=='R')
	{
		theWinner = PLAYER;
	}
	else
	{
		theWinner = COMPUTER;
	}
	return theWinner;

*/
winnerType determineWinner( char player, char computer )
{
	
}



