目录
C++程序课程设计 .........................................................................................................1
第一章 课题介绍 ......................................................................................................2
1.1 选题背景 .................................................................................................................3
1.2 关于编译软件 .........................................................................................................3
1.3 关于兼容性 .............................................................................................................4
第二章 设计概要 ......................................................................................................4
2.1 程序功能简介 .........................................................................................................4
2.2 程序流程 .................................................................................................................4
第三章 游戏实现 ......................................................................................................5
3.1 创建工程 .................................................................................................................5
3.2 游戏界面控制 .........................................................................................................7
3.2.1 墙、框体的绘制..........................................................................................7
3.2.2 蛇身的绘制..................................................................................................8
3.2.3 食物的绘制..................................................................................................9
3.3 游戏控制 ...............................................................................................................11
3.3.1 蛇的移动....................................................................................................11
3.3.2 蛇死亡的判断............................................................................................13
3.3.3 消息窗口的弹出........................................................................................13
3.3.3.1 开始消息框 .......................................................................................13
3.3.3.2 关卡消息框 .......................................................................................14
3.3.3.3 结束消息框 .......................................................................................15
3.3.4 游戏音效....................................................................................................16
第四章 结果与讨论..............................................................................................17
4.1 程序运行 ...............................................................................................................17
4.2 对源程序的改进 ...................................................................................................18
4.3 错误调试与分析 ...................................................................................................18
4.3.1 关于窗口的重画问题................................................................................18
4.3.2 关于双音轨的问题....................................................................................18
4.3.3 程序的稳定性............................................................................................19
4.4 课程设计心得与体会 ...........................................................................................19
附录..............................................................................................................................21
第一章 课题介绍