// Player.h

#ifndef PLAYER
#define PLAYER

#include "RandomInt.h"
#include <string>
using namespace std;

class Player
{
 public:
   Player(const string& name);
   
   string getName() const;
   int takeTurn(int opponentsLastRoll);
   void updateData(int opponentsLastRoll);
   void raiseScore(int amount);
   virtual bool stop() const = 0;
 
 private:
  string myName;
  int    myScore;
  int    myOpponentsScore;
  int    myFirstRoll;
  int    myCurrentRoll;
  int    turnNumber;
};

inline Player::Player(const string& name)
{
  myName = name;
  myScore = myOpponentsScore = 0;
  turnNumber = 0;
}

inline void Player::updateData(int opponentsLastRoll)
{
  myOpponentsScore += opponentsLastRoll;
  turnNumber++;
}

inline string Player::getName() const
{
  return myName;
}

inline void Player::raiseScore(int amount)
{
  myScore += amount;
}

#endif


