#ifndef __MINMAX_H__
#define __MINMAX_H__

#include "MinMaxNodes.h"
#include "patterns.h"


#define XTURN 1
#define OTURN 0

#define XWINS 1
#define OWINS -1
#define TIE   0
#define NOWINS 7

class MinMax
{
  public:
    MinMax();
    ~MinMax();
    int GenerateChildren(Node * _parent, int _turn);
    int PlayGame(Node * _node, int _turn);
  private:
    int CheckForWinner(unsigned long _xLocation, unsigned long _oLocation);
    void PropagateScore(Node * _node, int _winner);
    void DumpBoard(unsigned long _x, unsigned long _o);
    void Stop();


};

#endif
