// NoughtsDoc.h : interface of the CNoughtsDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_NOUGHTSDOC_H__4E34685C_C7DD_11D2_8D7D_00104B11A479__INCLUDED_)
#define AFX_NOUGHTSDOC_H__4E34685C_C7DD_11D2_8D7D_00104B11A479__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Statistics.h"

class CNoughtsDoc : public CDocument
{
protected: // create from serialization only
	CNoughtsDoc();
	DECLARE_DYNCREATE(CNoughtsDoc)

// Attributes
public:
	bool	countwin, playerswap;
	int	noughtwin, crosswin, draw;
	bool multipledirections;
	int	player1, player1win, player2, player2win;
	CStatistics  statisticsbox;
	int noswap;

// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CNoughtsDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	virtual void DeleteContents();
	//}}AFX_VIRTUAL

// Implementation
	int	statusbox [9];
	int	undoarray [9] [9];
	int	slash, winner, autostart, raised, rounded;
	int winme[9];
	int winthem[9];
	int winb[9];
	int	tester;

public:
	int WinningPlayer();
	int randommove(int box[9]);
	int result();
	int pturn();
	void computerturn();
	int computemove(int box[9]);
	void testmove(int box[9]);
	int testslash();
	void clearall();
	void undo();
	void setbox(int box);
	int	turn();
	int	count();
	virtual ~CNoughtsDoc();

#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CNoughtsDoc)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	// Generated OLE dispatch map functions
	//{{AFX_DISPATCH(CNoughtsDoc)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_DISPATCH
	DECLARE_DISPATCH_MAP()
	DECLARE_INTERFACE_MAP()
};

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

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_NOUGHTSDOC_H__4E34685C_C7DD_11D2_8D7D_00104B11A479__INCLUDED_)
