//////////////////////////////////////////////////////////////////////////////
//
// File: game.h
//
// Purpose: This is the interface for the Game class.  This determines and
//          maintains all the rules, players, game statistics, etc.
//
// Authors:
//   txe  Travis Emmitt
//
// Modifications:
//   14-APR-1998  txe  Initial creation
//   15-APR-1998  txe  Added SetDebug(), comments, alphabetized
//   16-APR-1998  txe  Added LoadPlayer(), LoadRules()
//   19-APR-1998  txe  Inherits from Debug, added School-related methods
//   20-APR-1998  txe  Added best_quality
//   21-APR-1998  txe  Added student, moved school stuff to School class
//   22-APR-1998  txe  Removed student
//   23-APR-1998  txe  Using static debug, changed constructor
//   24-APR-1998  txe  Removed num_sessions from Run()
//
//////////////////////////////////////////////////////////////////////////////

#ifndef GAME_H
#define GAME_H

#include "board.h"
#include "debug.h"
#include "player.h"
#include "referee.h"

class Game : public Debug {
protected:
  Board   *board;                      // game board
  int      num_win_boards;             // number of winning configurations
  int      num_players;                // number of players (minus Referee)
  Player  *players[MAX_PLAYERS];       // all of the game participants
  Referee *ref;                        // referee (same as players[0])
  Board   *win_boards[MAX_WIN_BOARDS]; // winning configurations (boards)
  
public:
  Game (char *name, char *players_file, char *rules_file);
  int  LoadPlayers (char *filename);   // determines the participants
  int  LoadRules   (char *filename);   // selects a TicTacToe rules variant
  void PrintWins   ();                 // prints each players' winning stats
  void PrintWins   (int debug);        // same thing, but with debug option
  int  Run         (int num_matches, int num_games);
};

#endif

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

