//////////////////////////////////////////////////////////////////////////////
//
// File: board.h
//
// Purpose: Interface for the Board class.  A Board can be a game board,
//          a winning configuration matrix, or a "scratch" board that Players
//          can use in planning their turns.  (TradPlayer uses one.)
//
// Authors:
//   txe  Travis Emmitt
//
// Modifications:
//   14-APR-1998  txe  Initial Version
//   15-APR-1998  txe  Added Print(), SetDebug(), comments
//   23-APR-1998  txe  Inherits from Debug, changed constructor
//
//////////////////////////////////////////////////////////////////////////////

#ifndef BOARD_H
#define BOARD_H

#include "common.h"
#include "debug.h"

#define MAX_X		10
#define MAX_Y   	10
#define EMPTY		0

class Board : public Debug {
private:
  int  colors[MAX_X][MAX_Y];		      // current state of the board
  int  size_x;                                // width  in number of squares
  int  size_y;                                // height in number of sqares

public:
  Board (char *name, int max_x, int max_y);   // constructor
  void Copy       (Board *b);                 // copies over a board's state
  int  GetColor   (int x, int y);             // returns color of square
  int  GetMatch   (int x1, int y1, Board *b); // does our board match b?
  int  GetSizeX   ();                         // returns board width
  int  GetSizeY   ();                         // returns board height
  int  GetWinner  (Board **win_boards);       // returns color of any winner
  int  MovesLeft  ();                         // returns # of empty squares
  void Print      ();                         // prints board name & state
  void Print      (int debug);                // same thing, w/ debug option
  void SetColor   (int x, int y, int color);  // sets the color of a square
};

#endif

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

