MFC编写的贪吃蛇源码

上传者: zyc285230318 | 上传时间: 2020-01-13 03:16:53 | 文件大小: 3.74MB | 文件类型: rar
里面有完整的注释!! 适合学习 贪食蛇编程要点 1、每次刷屏时需要注意无效矩形区的大小和位置,一般取整条蛇最小坐标和最大坐标组成的矩形(包括蛇的头和身体) 2、蛇全身的运行轨迹应该参照蛇头的运行轨迹 3、蛇吃下东西之后身体各点的变化情况应该参照第一点的变化,即第一点发生变化之后下一时间段第二点发生变化,再下一时间段第三点发生变化,依此类推,直到最后一点发生变化结束 4、分数的计算变量:蛇吃的一般屎数量、蛇吃大屎的数量、游戏的难度级别 计算公式:(一般屎数量+大屎数量)*难度级别 5、一个问题:游戏的难度设置选项框和主窗口发生数据交换采用了两种方法,发送消息法和读写外部文件法,第三种选择就是采用全局变量,但都不是太好,有没有更合适的方式保证实现该功能的同时不致使程序显得晦涩难懂不易修改和维护

文件下载

资源详情

[{"title":"( 70 个子文件 3.74MB ) MFC编写的贪吃蛇源码","children":[{"title":"贪吃蛇","children":[{"title":"读我.txt <span style='color:#111;'> 661B </span>","children":null,"spread":false},{"title":"ICONMAP7.ICO <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"BODY2.ICO <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"WIN32.APS <span style='color:#111;'> 1.51MB </span>","children":null,"spread":false},{"title":"ICONMAP0.ICO <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"StdAfx.cpp <span style='color:#111;'> 292B </span>","children":null,"spread":false},{"title":"BITMAP2.BMP <span style='color:#111;'> 958B </span>","children":null,"spread":false},{"title":"ICO00001.ICO <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"win32.vcproj <span style='color:#111;'> 6.99KB </span>","children":null,"spread":false},{"title":"GAMEOVER.ICO <span style='color:#111;'> 318B </span>","children":null,"spread":false},{"title":"WIN32.ICO <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"WIN32.RC <span style='color:#111;'> 10.72KB </span>","children":null,"spread":false},{"title":"BITMAP0.BMP <span style='color:#111;'> 958B </span>","children":null,"spread":false},{"title":"WIN32.PLG <span style='color:#111;'> 1.78KB </span>","children":null,"spread":false},{"title":"BODY3.ICO <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"Begin.wav <span style='color:#111;'> 1.06MB </span>","children":null,"spread":false},{"title":"WIN32.SLN <span style='color:#111;'> 910B </span>","children":null,"spread":false},{"title":"BACKGROU.BMP <span style='color:#111;'> 1.25MB </span>","children":null,"spread":false},{"title":"ICON1.ICO <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"BITMAP7.BMP <span style='color:#111;'> 958B </span>","children":null,"spread":false},{"title":"BITMAP6.BMP <span style='color:#111;'> 958B </span>","children":null,"spread":false},{"title":"ICON2.ICO <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"SMALL.ICO <span style='color:#111;'> 318B </span>","children":null,"spread":false},{"title":"源码爱好者.url <span style='color:#111;'> 133B </span>","children":null,"spread":false},{"title":"BITMAP9.BMP <span style='color:#111;'> 958B </span>","children":null,"spread":false},{"title":"BITMAP3.BMP <span style='color:#111;'> 958B </span>","children":null,"spread":false},{"title":"WIN32.SUO <span style='color:#111;'> 9.00KB </span>","children":null,"spread":false},{"title":"ICONMAP4.ICO <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"win32.pdb <span style='color:#111;'> 425.00KB </span>","children":null,"spread":false},{"title":"vc60.pdb <span style='color:#111;'> 188.00KB </span>","children":null,"spread":false},{"title":"win32.exe <span style='color:#111;'> 2.01MB </span>","children":null,"spread":false},{"title":"vc60.idb <span style='color:#111;'> 97.00KB </span>","children":null,"spread":false},{"title":"win32.ilk <span style='color:#111;'> 252.26KB </span>","children":null,"spread":false},{"title":"StdAfx.obj <span style='color:#111;'> 54.18KB </span>","children":null,"spread":false},{"title":"win32.res <span style='color:#111;'> 1.50MB </span>","children":null,"spread":false},{"title":"win32.pch <span style='color:#111;'> 1.87MB </span>","children":null,"spread":false},{"title":"win32.obj <span style='color:#111;'> 70.46KB </span>","children":null,"spread":false}],"spread":false},{"title":"ICO00004.ICO <span style='color:#111;'> 92.47KB </span>","children":null,"spread":false},{"title":"ICONMAP3.ICO <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"ICONMAP9.ICO <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"ME.BMP <span style='color:#111;'> 20.94KB </span>","children":null,"spread":false},{"title":"SNAKE.INI <span style='color:#111;'> 158B </span>","children":null,"spread":false},{"title":"BMP1.BMP <span style='color:#111;'> 958B </span>","children":null,"spread":false},{"title":"WIN32.DSW <span style='color:#111;'> 535B </span>","children":null,"spread":false},{"title":"ICONMAP8.ICO <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"StdAfx.h <span style='color:#111;'> 955B </span>","children":null,"spread":false},{"title":"MARIOBRE.ICO <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"BITMAP5.BMP <span style='color:#111;'> 958B </span>","children":null,"spread":false},{"title":"WIN32.DSP <span style='color:#111;'> 6.88KB </span>","children":null,"spread":false},{"title":"ICONMAP2.ICO <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"Win32.opt <span style='color:#111;'> 50.50KB </span>","children":null,"spread":false},{"title":"Release","children":null,"spread":false},{"title":"ICO00003.ICO <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"BODY.ICO <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"WIN32.H <span style='color:#111;'> 323B </span>","children":null,"spread":false},{"title":"WIN32.ncb <span style='color:#111;'> 41.00KB </span>","children":null,"spread":false},{"title":"ICONMAP6.ICO <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"GameOver.wav <span style='color:#111;'> 223.81KB </span>","children":null,"spread":false},{"title":"Mario.ico <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"ICON3.ICO <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"RESOURCE.H <span style='color:#111;'> 3.79KB </span>","children":null,"spread":false},{"title":"SHIT.ICO <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"MINE.H <span style='color:#111;'> 75B </span>","children":null,"spread":false},{"title":"GameOver.bmp <span style='color:#111;'> 69.04KB </span>","children":null,"spread":false},{"title":"BITMAP1.BMP <span style='color:#111;'> 958B </span>","children":null,"spread":false},{"title":"ICONMAP1.ICO <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"BITMAP4.BMP <span style='color:#111;'> 958B </span>","children":null,"spread":false},{"title":"ICONMAP5.ICO <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"ICO00002.ICO <span style='color:#111;'> 2.19KB </span>","children":null,"spread":false},{"title":"SHEN.BMP <span style='color:#111;'> 20.94KB </span>","children":null,"spread":false},{"title":"WIN32.CPP <span style='color:#111;'> 50.52KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

  • Dengzijing123 :
    感觉适合初学者
    2017-12-26
  • 我的大白菜呢 :
    画面很好看,代码放到一起了,有些看不懂
    2015-12-07
  • qq_29999063 :
    做得很不错,很不错
    2015-07-21
  • iamabadgirl :
    不错啊,,可以编译出来
    2014-12-06
  • Jiazhou_Lvguan :
    很 nice的代码,很正规
    2014-11-19

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明