1、 1 目 录 摘要 1 前言 1 1 程序概况 3 1.1 功能 3 1.2 开发环境和运行环境 4 2 实现技术 4 2.1 通信技术 4 2.2 软件界面设计 7 2.3 MFC. 8 3.可行性分析和需求分析 . 9 3.1 可行性分析. 9 3.2 需求分析 9 4 五子棋的设计 . 10 4.1 系统设计思想 . 11 4.2 系统总体设计 . 11 4.3 工作流程 . 12 4.4 流程图 . 13 4.5 通信协议. 14 5.客户端的实现 . 15 5.1 主要的成员变量 . 15 5.2 主要类的功能以及成员函数介绍 . 16 6.服务器的实现 . 19 6.1 主要的成员
2、变量 . 19 6.2 重要数据结构 . 20 6.3 主要类的功能以及成员函数介绍. 21 7 主要算法 . 22 7.1 判断胜负 22 7.2 人机对弈算法 . 23 致 谢 . 29 参考文献 . 30 1 网络五子棋网络五子棋 摘要摘要:目前,以计算机技术和网络技术为核心的现代网络技术已在现实生活和生 产中得以广泛的使用,休闲类网络游戏集趣味性,娱乐性,互动性和益智性于一 体,已经成为多数人群的休闲方式。本程序是 VC 平台下的一个小程序,使用 C+ 语言,基于 MFC 类库,所有的类均继承于 MFC 类库,通过对 Socket 技术理解, 实现在局域网内客户端和服务器之间的连接,通
3、信,以及处理信息字段来获取具 体的信息类型和和内容,以实现程序的聊天内容,图形加载,主机连接,以及五 子棋核心进程之间的通信。 关关键词键词:MFC,Socket,客户端,服务器 Abstract:At present, in computer technology, and network technology at the core of modern network technology has been in real life and production have been widely used, the type of network set of amusement game
4、, recreational, interactive and intelligence in one, has become the most of people relaxed manner.This program is a small program at the VC platform of a small program,useing the C+ language, based on a MFC class library,all in succession to the class library MFC, socket and technical understanding and achieve in the lan the client and server connections between communication and information field to obtain specific types of information and implement the program content, chatter, graphic