毕业设计(论文):Linux环境下五子棋游戏设计

上传人:绿** 文档编号:45956750 上传时间:2018-06-20 格式:DOC 页数:32 大小:526KB
返回 下载 相关 举报
毕业设计(论文):Linux环境下五子棋游戏设计_第1页
第1页 / 共32页
毕业设计(论文):Linux环境下五子棋游戏设计_第2页
第2页 / 共32页
毕业设计(论文):Linux环境下五子棋游戏设计_第3页
第3页 / 共32页
毕业设计(论文):Linux环境下五子棋游戏设计_第4页
第4页 / 共32页
毕业设计(论文):Linux环境下五子棋游戏设计_第5页
第5页 / 共32页
点击查看更多>>
资源描述

《毕业设计(论文):Linux环境下五子棋游戏设计》由会员分享,可在线阅读,更多相关《毕业设计(论文):Linux环境下五子棋游戏设计(32页珍藏版)》请在金锄头文库上搜索。

1、I摘摘 要要五子棋是一种益智游戏,它能增强玩家的思维能力,提高智力,而且富含哲理,有助于修身养性。本系统的五子棋设置了三种模式,自我对战、人机对战和网络对战。三种模式中都有菜单操作、落子、判断胜负、胜利方棋子闪烁、棋局重现、返回上级菜单和退出的功能,自我对战中设有悔棋的功能;人机对战采用贪心算法,分别算出人和机器的最佳落子位置的分数,并进行相比,当机器最佳落子位置分数高时,机器落子的位置是它自己的分数最高的位置,如果人的最佳落子位置的分数高于机器,那么机器就占用人的最佳落子位置;网络对战模式中一方先建立游戏,作为游戏的服务器端,对方作为客户端连接服务器端,发送五子棋信息主要是五子棋落子坐标和存

2、储棋子的颜色。三种模式都以双向链表栈的形式存储棋子的坐标和落子的颜色,并且有一个二维数组形式的模拟棋盘存储某个位置的落子情况(用颜色来标记,如果没有落子就设置为 NONE)。本系统使用 Linux 环境由 C 语言来编写,调用 Ncurses 库来完成五子棋游戏的综合编码。关键词关键词:自我对战;人机对战;网络对战;Linux;NcursesIIABSTRACTGobang is a puzzle game, it can enhance players thinking ability, improve intelligence, and high in philosophy, helps

3、to ones self-cultivation. This version of the gobang is set up three kinds of mode, man_vs_man, man_vs_computer and network play. Three kind of modes all have function of the menu operation, chess down, victory judgment, chess flash when win, chess reshow, returning to previous menu and exiting. Man

4、_vs_man mode has taken back function. Man_vs_computer mode adopts greedy algorithm that calculates scores of man and computer of their best location to put down chess respectively. Compare mans score and score of computer, if score of computer is higher than mans, then computer puts its chess down t

5、o its best location, otherwise, computer will put its chess down to mans best location. In the mode of network play, one side is to be established as a game server side first, then the other as the client to connect the server side, each message they send to each other is contains the color and the

6、coordinate of the chess that put down last time. Three kinds of modes all store their chess color and chess location in a two-way chain table of stack, and available in the form of a two-dimensional array simulation board stored somewhere chess put down and its color (use color to mark, if it does n

7、ot move later is set to NONE). This topic uses the Linux environment by C language to write, call the Ncurses functions library can accomplish comprehensive coding of gobang game .Keywords:Man_vs_man; man_vs_computer; Network play; Linux; NcursesI目目 录录摘摘 要要.IABSTRACT.II1 概述.11.1 开发背景、目的与意义.11.2 国内外概

8、况.11.31.3 开发目标.22 系统需求分析与总体设计.42.1 系统需求分析.42.1.1 系统概述.42.1.2 功能需求分析.42.1.3 非功能需求分析.52.2 系统总体方案的建立.52.3 系统开发方法与开发平台.62.3.1 开发方法.62.3.2 开发平台.62.4 本章小结.63.详细设计.73.1 数据存储模块.73.1.1 数据结构.73.1.2 相关数据.73.1.3 相关功能.7II3.2 界面模块.83.2.1 相关数据.83.2.2 相关功能.83.3 其他公共功能函数模块.103.3.1 相关功能.103.4 游戏功能模块.123.4.1 游戏主要操作流程图.123.4.2 自我对战模块.133.4.3 人机对战模块.143.4.4网络对战模块.173.5 本章小结.184. 原型系统介绍.194.1 测试流程.

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 学术论文 > 毕业论文

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号