摘要:连连看游戏是普及甚广的一款益智游戏。本文在Visual Studio 2008的开发环境下设计了一款连连看游戏,完成了以下功能:界面初始化功能、操作功能、计时功能、设置管理功能以及积分排名功能。重点阐释了如何判断2张图片能否被消除的算法:先要判定2张图片是否为相同类型;若类型相同则判断它们之间是否连通,连通路径必须小于或等于2个拐角;若2张图片之间存在小于或等于2个拐角的连通路径便可被消除。本款游戏设计了右键提示功能,帮助玩家快速定位符合消除条件的2张图片;能够记载玩家的游戏记录并进行排名;还可以修改游戏图片类型,玩家可以选择班级同学的图片,从而增加了趣性和具有了毕业纪念意义。29422 毕业论文关键词: VS2008;算法;趣性;
Lianliankan game design
Abstract: Lianliankan is a game which is very popular and an entertainment when people are at leisure. In this paper, lianliankan game based on VS2008 with the following features is designed: Interface initialization, game operation, timing, setting, management and score ranking. The focus of this paper is the algorithm which determines whether two pictures can be eliminated. The algorithm is as follows. First of all, analyzing whether two pictures are the same type. If they are the same type, then analyzing whether they are connected. When there is a connection with at most two corners, these two pictures can be eliminated. In this game, the function of right tip is designed. It can help players find out two pictures which meet the condition of being eliminated. The function of recording is designed. It can record players’ scores and rank these scores. The function of modifying the picture’s type is designed. It allow players to select two types of pictures,increase the entertainment and has the meaning of the graduation memorial.
Keywords: VS2008; algorithm; entertainment;
目录
1 绪论 1
1.1 课题研究背景和现状 1
1.2 课题研究的目的和意义 1
1.3 课题研究的内容 1
2 需求分析 3
2.1 游戏界面实现功能 3
2.2 游戏基本操作功能 3
2.3 计时功能 4
2.4 设置管理功能 4
2.5 积分记载排名功能 4
3 设计并实现 5
3.1 界面初始化模块的设计与实现 5
3.1.1 数据结构 5
3.1.2 初始化图形界面 7
3.2 基本操作功能模块的设计与实现 7
3.2.1 判断连续两次点击的图片的路径类型 8
3.2.2 判断路径相通的两张图片能否消去 12
3.2.3 对玩家在游戏界面上的操作做出恰当的反应 13
3.3 计时功能模块的设计与实现 14
3.4 设置管理模块的设计与实现 15
3.4.1 设置限定时间 15
3.4.2 鼠标右键提示 17
3.4.3 设置游戏图片的类型 19
3.5 积分记载排名模块的设计与实现 20
4 测试 24
5 结论 30
致谢 31