//////////////////////////////////////////////////////////////////////////////
//
// File: tplayer.h
//
// Purpose: This is the interface for the TradPlayer class.  A TradPlayer is
//          is a "traditional AI" player; its logic is typically considered
//          from the top down.
//
// Authors:
//   txe  Travis Emmitt
//
// Modifications:
//   14-APR-1998  txe  Initial Version
//   15-APR-1998  txe  Added comments, GetEasyMove(), GetHardMove()
//   16-APR-1998  txe  Added GetMove(), NewMatch()
//   23-APR-1998  txe  Added name to constrcutor
//   24-APR-1998  txe  Moved ability from Player to here
//   01-MAY-1998  txe  Added hypo, EvaluateMove(x,y,depth)
//   04-MAY-1998  txe  Added comments, removed old EvaluateMove() method
//
//////////////////////////////////////////////////////////////////////////////

#ifndef TPLAYER_H
#define TPLAYER_H

#include "player.h"

#define IDIOT		0       // These are player ability levels.  The
#define ROOKIE          1       //   range is from IDIOT (who looks at
#define AVERAGE		2       //   every square on the board (in order)
#define SKILLED		3       //   and if it's free, will go there) to
#define EXPERT		4       //   the PERFECT player, who (ideally)
#define PERFECT		5       //   never loses (always wins or draws).

static char ability_string[][MAX_LEN+1] = {
  "Idiot", "Rookie", "Average", "Skilled", "Expert", "Perfect"
};

static char ability_loss_rate[][MAX_LEN+1] = {
  100, 70, 40, 20, 10, 0
};

//////////////////////////////////////////////////////////////////////////////

class TradPlayer : public Player {
  private:
  int      ability;   	  	       // player's ability level
  Board   *hypo;                       // hypothetical board, for look-ahead
  Referee *ref;                        // pointer to referee (player[0])

  int EvaluateMove (int x, int y, int depth); // uses look-ahead
  int GetEasyMove  ();                 // get best easy move (WIN or BLOCK)
  int GetHardMove  ();                 // get best hard move (special cases)
  
public:
  TradPlayer (char *name, int color, int ability);
  int GetMove ();                      // override, gets next move
};

#endif

//////////////////////////////////////////////////////////////////////////////

