1、 i 连连看游戏设计与实现 摘 要 “连连看”游戏是一款常见游戏。游戏速度节奏快,画面清晰可爱,适合大众玩 家。本文主要介绍了游戏的设计过程,其中游戏主要分为 4 个模块,游戏界面模块、 图片随机生成模块、图片消除路径判断、背景音乐模块。 游戏核心模块中图片随机生成采用了数字和图片绑定,运用随机函数以及数组交 换的算法, 实现了游戏图片初始化状态, 有效的解决了图片排布问题, 方案简单易行; 另一核心模块图片消除路径判断,主要采用了分类判断的算法,将连连看图片的位置 一一归类,分类设计函数判断位置,实现游戏的基本消除功能。算法思路清晰,便于 理解和编码。 本游戏实现了连连看的基本功能,可以准确
2、的消除图片、记录分数、提示时间, 同时设计了人性化的提示,解决僵局的功能,创新实现了新的连连看规则消除图 片后给予时间奖励,激发了玩家的积极性。 关键词: QT;连连看;算法;数组 ii Link Game Design and Implementation Abstract Linkgame is a common game. The game has fast-paced speed and the cute picture That is fit for public players . This paper describes the design process of the gam
3、e , where the game is divided into four modules, the game interface module , the module of randomly generated pictures , eliminating path judgment , background music modules. Game Core module, the module of randomly generated pictures ,bind pictures and images, use the random function and a array ex
4、change algorithm, and achieve game picture initialization state , effectively solve the problem of picture arrangement , the plan is simple ; another core module pictures ,eliminate path judgment , mainly uses classification algorithms to determine the location of linkgame picture and classify it , classification functions judge the location,and realize the basic function of the game cancellation . Algorithm is clear, easy to understand and encoding. The game realize the basic function of li