1、 I 目录目录 前言前言 1 1 1 1 扫雷游戏概述扫雷游戏概述 2 2 1.1 基本信息 2 1.2 游戏玩法简介 2 2 2 系统平台与技术选择系统平台与技术选择 3 3 2.1 开发语言与工具 3 2.2 技术选择 3 3 3 扫雷游戏需求分析扫雷游戏需求分析 4 4 3.1 编写需求分析的目的 . 4 3.2 功组织结构图 4 4 4 扫雷游戏软件总体设计扫雷游戏软件总体设计 5 5 4.1 主要功能模块划分. 5 4.2 设计步骤流程 6 5 5 扫雷游戏程序详细设计扫雷游戏程序详细设计 8 8 5.1 编写详细设计的目的 . 8 5.2 单机版扫雷游戏的实现 . 8 5.3 完成
2、单机版扫雷游戏界面设计 . 9 5.4 单机游戏状态转换图 11 5.5 网络扫雷的实现 . 12 6 6 程序功能完善与优化程序功能完善与优化 1717 6.1 增加音乐效果 . 17 6.2 保存功能 . 17 II 6.3 发送鼠标功能的优化 17 6.4 增加排行榜功能 . 17 6.5 增加首次点击不会点到雷的功能 18 6.6 增加网络版双方玩家点击计数 18 6.7 增加聊天功能 . 19 7 7 网络扫雷游戏功能测试网络扫雷游戏功能测试 1919 8 8 结结 论论 2828 总总 结结 2929 致致 谢谢 3030 参参 考考 文文 献献 3131 附录附录 3232 II
3、I 摘摘 要要 本软件是一款具有联机功能的扫雷游戏,并且具有单机游戏功能。联机功能 采用 C/S 模型,通过服务器程序中转消息,完成对游戏消息的传送。程序功能丰 富,具有多种难度,且带有保存,排行榜,聊天等功能。 程序的设计采用了模块化程序设计的方法,对底层模块和经常被调用的函 数,进行封装。使得单机扫雷游戏与网络版的扫雷都可以共用底层的游戏逻辑。 且使得在单机版的基础上实现网络功能变得简单。 游戏界面美观,显示的数字和地雷都用贴图实现。 关键词:关键词:扫雷游戏;C/S 模型;服务器; IV Abstract This software is a mine sweeper game with
4、 online features and functionality with a single game. Online features using C / S model, the game send the the message through the server program . This program has a lot of functions,like a variety of difficulty, and with a save,high scores, chat and other functions. Program was designed with a modular design method, often called the bottom of the module and function of the package. Makes the game stand-alone mine clearance and the network version of the game can