// SixtyFourDoc.h : interface of the CSixtyFourDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_SIXTYFOURDOC_H__2F2A1E73_070A_4AF3_802A_30D62F09D9DB__INCLUDED_)
#define AFX_SIXTYFOURDOC_H__2F2A1E73_070A_4AF3_802A_30D62F09D9DB__INCLUDED_

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


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

// Attributes
public:
	UINT m_uGameCube[64];
	Player m_plPlayers[3];
	BOOL m_bGameOver;
	UINT m_nGameState;
	UINT m_nCurrentPlayer;
	Move m_moveHistory[64];
	int m_nCurrentMove;
	int m_nLastMove;
	UINT m_nWinner;
	double m_gldRotateAroundX;
	double m_gldRotateAroundY;

	BOOL MakeMove(Move move, BOOL bUpdateHistory = TRUE);
	void UnMakeMove(Move move);
	void SwitchPlayers();
	UINT GetOpponent();

	BOOL HistoryCanGoBack();
	BOOL HistoryCanGoForward();
	void HistoryGoBack();
	void HistoryGoForward();
	void HistoryGoStart();
	void HistoryGoEnd();
	UINT IsGameOver();


// Operations
public:

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSixtyFourDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	virtual void ReportSaveLoadException(LPCTSTR lpszPathName, CException* e, BOOL bSaving, UINT nIDPDefault);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CSixtyFourDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CSixtyFourDoc)
		// 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()
};

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

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

#endif // !defined(AFX_SIXTYFOURDOC_H__2F2A1E73_070A_4AF3_802A_30D62F09D9DB__INCLUDED_)
