1、 1 毕业设计(论文) 基于 VC 的成三棋游戏程序的设计与实现 2 摘摘 要要 随着科学技术(特别是计算机网络技术)日新月异的发展人们的生活也发生 了空前的变化。现在生活在大都市的人们总免不了想体验儿时那乡村乐趣,只是 苦恨没有途径;从小在城市长大的孩子也想多一些趣味游戏,并且他们父母也希 望孩子可以多了解了解农村生活以助于孩子的成长。 成三棋,一款乡村儿时游戏,将我们彼此拉近了距离,结合计算机网络技术 使得城乡娱乐简易可行。 该游戏以 vc+为基础平台,借鉴五子棋、象棋、围棋等多种棋种核心算法, 采用网络套接字(Socket)技术,引用 MFC 类库及 WIN API 函数;实现友好的人
2、机界面,网内对弈、单机对弈等多项功能。拥有浓浓的乡村风味、简易操作、强 烈的娱乐性与趣味性。 关键字关键字:VC/VC+,网络游戏,成三棋,乡村风味,计算机网络技术 3 4 AbstractAbstract With the dramatic development of science and technology especially the computer networking technology.Our life has an unprecedented change. People who live in the metropolis cant help to thinking
3、of experiencing the fun of childhood again,but bitterly to find that time past and never find again. The children burn in the city also want to have more funny games,and to their parent,its very helpful for the childrengrowth to learn more about rural lives. Three chess, a rural game played in child
4、hood,puts us together,as well as makes rural entertainment more simple and practical with combining computer networking technology. The game,based on VC+,has not only realized many functions,such as a comfortable interface between human beings and machine, a network competition and single-machine co
5、mpetition ,etc. But owned a thick rurals flavors simple and easy operation,strong entertainment and interesting,which mainly are achieved by virtue of refering the core algorithm of gobang ,etc,adopting network socket technology,quoting MFC class library and WIN API functions. KEY WORDS:VC/VC+,NetWo
6、rk Game,Three-in-a low,rural flavors, Network technology. 5 目目 录录 1.绪论 1.1 课题背景 错误错误! !未定义书签。未定义书签。 2 系统实现技术与开发环境 . 2 2.1 C/C+简介.2 2.2 VC 开发环境 . 3 2.2.1 GDI 绘图 . 3 2.2.2 对话框 . 4 2.2.3 消息响应 . 5 2.2.4 游戏编程思想6 2.3 MFC 总述 . 7 2.3.1MFC 中类的结构及联系.8 2.3.2 MFC 中类的作用9 3 需求分析 . 10 3.1 游戏用户分析 10 3.2 游戏功能分析 10 3.3 游戏的功能模块主要功能 错误错误! !未定义书签。未定义书签。 3.3.1 登录模块10 3.3.2 下棋模块10 3.3.3 英雄榜模块10 4 系统概要设计 . 错误错误! !未定义书签。未定义书签。 4.1 模块结构设计 错误错误! !未定义书签。未定义书签。 4.1.1 游戏者登录管理模块 错误错误! !未定义书签。未定义书签。 4.1.2 游戏者下棋实