1 本科毕业论文(设计)模板面向对象方法及程序设计课程设计报告题目: 吃豆子游戏分组:第 17组组员姓名: 周俊晨、白增垚、武春晓班级: 计本 1203 班指导教师: 刘通完成日期: 2014 年6月 20日 2 目录一、游戏功能描述............................... 3 二、程序源代码................................. 3-18 三、程序运行结果............................... 19 四、课程设计总结报告........................... 20 3 一、游戏功能描述(一) 设计目的: 实现小时候经典 PC 游戏,吃豆子,练习基础 JAVA 基础技能。完成课程设计。(二) 设计要求: 1.. 基本实现玩家躲避怪物,并且吃掉所有豆子的所有功能。 2. 满足人们需求加入个性化效果,实现画面简洁. 美观. 有吸引力。 3. 实现游戏的可靠性. 安全性. 完整性. 灵活性。(三) 设计规则: 蓝色大嘴代表玩家,红色大头代表妖怪,白色小猪代表豆子。玩家选择进入游戏会有 6 条生命,和怪物撞在一起牺牲一次直至游戏结束。玩家需在地图里的迷宫里躲避怪物的同时吃完所有的豆子方可取胜,不限时间。二、程序源代码// : interface of the CZjcView class // ///////////////////////////////////////////////////////////////////////////// #if !defined(AFX_ZJCVIEW_H__1345D381_A306_4542_BF88_AA50591204E3__INCLUDED _) #define AFX_ZJCVIEW_H__1345D381_A306_4542_BF88_AA50591204E3__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 class CZjcView : public CView { protected: // create from serialization only CZjcView(); DECLARE_DYNCREATE(CZjcView) 4 // Attributes public: CZjcDoc* GetDocument(); // Operations public: // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CZjcView) public: virtual void OnDraw(CDC* pDC); // overridden to draw this view virtual BOOL PreCreateWindow(CREATESTRUCT& cs); protected: virtual BOOL OnPreparePrinting(CPrintInfo* pInfo); virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo); virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo); //}}AFX_VIRTUAL // Implementation public: BOOL k; int x,y,h,s; char fangxiang; struct Q{ int x; int y; }qiang[185]; struct D{ int x; int y; int n; }dian[165]; struct G{ int x; int x0; int y;5 int y0; int n; }guai[12]; void clear(); void Clear(int i); void Qiang(); void Dian(); void Guaix(int j,int l,int f2); void Guaiy(int j,int l,int f2); void Guai (int j,int l,int f2,int f1); void Fangxiang(int i); virtual ~CZjcView(); #ifdef _DEBUG virtual void AssertValid() const; virtual void Dump(CDumpContext& dc) const; #endif protected
吃豆子VC++课程设计 来自淘豆网m.daumloan.com转载请标明出处.