没有合适的资源?快使用搜索试试~ 我知道了~
学位论文-—基于vc++的五子棋程序设计与实现.doc
0 下载量 57 浏览量
2023-07-01
16:07:25
上传
评论
收藏 638KB DOC 举报
温馨提示
试读
24页
学位论文-—基于vc++的五子棋程序设计与实现.doc
资源推荐
资源详情
资源评论
摘 要
C++语言是一种面向对象的语言,尽管在当前,可视化语言发展迅速,普及很快,但
C++语言作为一种基础的语言,它的有时依然存在,甚至有时它是不可替代的,特别是和
硬件接口技术相联系的软件。五子棋游戏是一种简单大众的游戏,自计算机实现以来,
深受广大电脑玩家的喜爱,现在流行的五子棋游戏软件大多缺乏美观的界面,和容易的
操作方法,电脑的 AI 值也不是很高。本文通过 C++语言在计算机图形方面的编程,设计
了五子棋游戏软件,使该软件具有还算美观和操作简单的界面,在人机对战时,分为低
级,中级和专家级,加大对游戏的乐趣,当然也可以实行人人对战。本游戏是以 C++语言
作为开发工具,采用搜索算法设计最优落子点开发的游戏软件。本文就是介绍五子棋软
件设计的全过程。
关键字 C++语言 面向对象 最优落子
Abstract
C + + language is an object-oriented language, although in the current, visual language
developed rapidly, spread quickly, but the C + + language as a basic language, it is sometimes
still exists, and sometimes it is irreplaceable, especially with hardware interface technology
associated software. Volkswagen backgammon game is a simple game, since the computer to
realize, the majority of PC gamers love, now popular backgammon game software lacks most
beautiful interface, and easy method of operation, AI value of the computer is not very high. In
this paper, C + + programming language in computer graphics, design a backgammon game
software, so that the software has the appearance and operation is fairly simple interface, the
man-machine war, divided into low, intermediate and expert level, increase the game fun, of
course, can also be implemented for all war. This game is based on C + + language as a
development tool, the search algorithm design optimal point developed game software. This
article is to introduce the whole process of backgammon software design.
Keyword C++ language Object-oriented the optimal initial
目录
1 绪论......................................................................6
1.1 五子棋的简介 ........................................................6
1.2 Visual C++的介绍....................................................7
1.3 开发环境及运行环境..................................................7
1.3.1 开发环境 ......................................................7
1.3.2 运行环境 ......................................................7
2 系统分析 .................................................................8
2.1 系统调研 ............................................................8
2.2 可行性分析 ..........................................................8
2.3 技术可行性分析.....................................................9
3 软件架构.................................................................10
3.1 棋盘类.............................................................10
3.1.1 主要成员变量..................................................10
3.2 主要成员函数说明...................................................10
3.2.1 清空棋盘 .....................................................10
3.2.2 绘制棋子 .....................................................10
3.2.3 左键消息 .....................................................11
3.2.4 绘制棋盘 .....................................................11
3.2.5 对方落子完毕 .................................................11
3.2.6 胜负的判断 ...................................................11
3.3 游戏模式类.........................................................11
3.3.1 主要成员变量..................................................11
3.3.2 主要成员函数..................................................12
3.4 资源编辑...........................................................13
3.5 消息说明 ...........................................................15
3.5.1 落子消息......................................................15
3.5.2 声音消息......................................................15
3.5.3 提示消息......................................................15
3.5.4 悔棋消息......................................................15
3.5.5 输赢消息......................................................15
3.5.6 再次开局消息..................................................16
4 主要算法.................................................................17
4.1 判断胜负 ...........................................................17
4.2 人机对弈算法 .......................................................17
4.2.1 获胜组合......................................................18
4.2.2 落子后处理....................................................18
4.2.3 查找棋盘空位..................................................18
4.2.4 落子打分......................................................18
4.2.5 防守策略......................................................18
4.2.6 选取最佳落子..................................................19
5 软件实现 ................................................................19
5.1 游戏运行 ...........................................................19
6 补充说明.................................................................23
7 结论.....................................................................24
致谢 ......................................................................24
1 绪论
剩余23页未读,继续阅读
资源评论
黑色的迷迭香
- 粉丝: 703
- 资源: 4万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功