毕业论文(设计)
题目
五子棋游戏的设计与实现数学与计算机科学学院信息与计算科学1101班拓守恒陕西理工学院
所在院系专业班级指导教师完成地点
2015年5月18日
f五子棋游戏的设计与实现
作者:王勇
(陕理工学院数学与计算机科学学院信息与计算科学专业1101班,陕西汉中723000)
指导教师:拓守恒摘要
五子棋是起源于我国古代的黑白棋种之一,是一种简单的娱乐性较强的大众游戏,深受广大玩家的喜
爱,但同时作为比赛,五子棋游戏还有着深奥的技巧。本系统的实现采用了C语言的模块化的程序设计方式,用VisualC60软件来实现程序的编译运行。实现黑白两方分别落子,通过棋盘上方的棋盘动态信息提示,轮流落子,本系统中游戏的每一个功能在程序中都是一个相对独立的模块,比如,棋盘模块,棋子模块,选择游戏模式模块,悔棋模块等等在程序中都是独立的,但它们之间通过逻辑关系的链接又构成了一个可以使游戏正常运行的程序。为实现游戏的双人对战模式和人机对战模式,并使得游戏尽量的简单化,本系统需要达成以下目标:设计一个简洁的游戏初始界面制定合法规则,使游戏能公正的进行,并且可以断定胜支持人机对战模式,可以是电脑通过人工智能和合法规则选出最优落子位置可以悔棋,在玩家落子落错位置时,可按下悔棋键进行悔棋。
关键词五子棋,游戏设计,C语言,双人对战,人机对战,人工智能
fDesig
era
dimpleme
tatio
ofgoba
ggame
Authorwa
gyo
g
Grade11Class1Majori
I
formatio
a
dcomputi
gscie
ceMathematicsa
dcomputerscie
ceDept
TutorTuoshouhe
g
Abstract:Goba
giso
eoftheblacka
dwhiteki
doforigi
atedi
a
cie
tChi
aisasimplea
d
e
tertai
i
gstro
germassgameslovedbythemajorityofplayersbutatthesametimeasthegamegoba
ggamewithprofou
dskillsTheimpleme
tatio
ofthissystemhasadoptedCofmodularprogramdesig
methodusi
gVisualC60softwaretorealizetheprogramcompilerru
i
gImpleme
tatio
ofblacka
dwhitetwopartiesmovelaterrespectivelybytheboardatthetopofthedy
amicmessageboardtaketur
stomovelaterthisgamei
thesystemeachfu
ctio
i
theprogramisarelativelyi
depe
de
tmodulessuchastheboardmodulepaw
moduleselectgamemodemodulebackmodulea
dsoo
i
theprogramarei
depe
de
tbuttheli
kthroughthelogicalrelatio
shipbetwee
thema
dformaca
makethe
ormaloperatio
ofthegameprogramI
ordertorealizethedoublemodea
dma
machi
egamemodea
dmakethegameasfaraspossiblethesimplificatio
thesystem
eedstoachievethefollowi
ggoalsdesig
asimplegameofi
itiali
terface;thelegalrulesca
makethegar