mergenewView.h
上传用户:sycq158
上传日期:2008-10-22
资源大小:15361k
文件大小:3k
源码类别:

游戏

开发平台:

Visual C++

  1. // mergenewView.h : interface of the CMergenewView class
  2. //
  3. /////////////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_MERGENEWVIEW_H__1413D7EC_1C04_11D6_A92C_99DC52C52B48__INCLUDED_)
  5. #define AFX_MERGENEWVIEW_H__1413D7EC_1C04_11D6_A92C_99DC52C52B48__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class CMergenewView : public CView
  10. {
  11. protected: // create from serialization only
  12. CMergenewView();
  13. DECLARE_DYNCREATE(CMergenewView);
  14. void HumanStepByStep();
  15. void Restart();  // initial some enviromental parammeters
  16. void DisplayPath(CDC *pDC);
  17. void DrawPathBlocks(CDC * pDC,CPoint point);
  18. void DrawPathBlocks(CDC * pDC,CRect& rect);
  19. void MicrobeStepByStep();
  20. void reInitWithoutMaze();
  21. // Attributes
  22. public:
  23. int width;
  24. CMergenewDoc* GetDocument();
  25. void DrawResult(CDC *pDC);
  26. void DrawMerge(CDC *pDC);
  27. void DrawColorBlocks(CDC * pDC,CRect &rect);
  28. void DrawWhiteBlocks(CDC * pDC,CRect &rect);
  29. void DrawColorBlocks(CDC * pDC,CRect &rect,int r,int g,int b);
  30. void DrawDoubleResult(CDC * pDC);
  31. CPoint point;
  32. bool showtag;
  33. bool resulttag;
  34. bool doubleresult;
  35. bool turn;
  36. long count;
  37. void DrawColorBlocks(CDC * pDC,CPoint point);
  38. void DrawWhiteBlocks(CDC * pDC,CPoint point);
  39. void DrawColorBlocks(CDC * pDC,CPoint point,int r,int g,int b);
  40. void InitView();
  41. void StepByStep();
  42. // Operations
  43. public:
  44. // Overrides
  45. // ClassWizard generated virtual function overrides
  46. //{{AFX_VIRTUAL(CMergenewView)
  47. public:
  48. virtual void OnDraw(CDC* pDC);  // overridden to draw this view
  49. virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
  50. protected:
  51. virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
  52. virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  53. virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
  54. //}}AFX_VIRTUAL
  55. // Implementation
  56. public:
  57. virtual ~CMergenewView();
  58. #ifdef _DEBUG
  59. virtual void AssertValid() const;
  60. virtual void Dump(CDumpContext& dc) const;
  61. #endif
  62. protected:
  63. // Generated message map functions
  64. protected:
  65. //{{AFX_MSG(CMergenewView)
  66. afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
  67. afx_msg void OnNewgame();
  68. afx_msg void OnResult();
  69. afx_msg void OnDoubleresult();
  70. afx_msg void OnPerfectmaze();
  71. afx_msg void OnHumanSbys();
  72. afx_msg void OnHumanGonow();
  73. afx_msg void OnCompAntHuman();
  74. afx_msg void OnMicrobeSbs();
  75. afx_msg void OnMicrobeGonow();
  76. afx_msg void OnCompMicroAnt();
  77. afx_msg void OnCompMicroHuman();
  78. afx_msg void OnRcompMicroAnt();
  79. afx_msg void OnCompAll();
  80. afx_msg void OnStatistic();
  81. afx_msg int OnSingle();
  82. afx_msg int OnWithoutcoop();
  83. afx_msg void OnWithsingle();
  84. //}}AFX_MSG
  85. DECLARE_MESSAGE_MAP()
  86. };
  87. #ifndef _DEBUG  // debug version in mergenewView.cpp
  88. inline CMergenewDoc* CMergenewView::GetDocument()
  89.    { return (CMergenewDoc*)m_pDocument; }
  90. #endif
  91. /////////////////////////////////////////////////////////////////////////////
  92. //{{AFX_INSERT_LOCATION}}
  93. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  94. #endif // !defined(AFX_MERGENEWVIEW_H__1413D7EC_1C04_11D6_A92C_99DC52C52B48__INCLUDED_)