I基于JAVA的五子棋游戏系统设计与实现专业电子信息工程学生董永杰指导教师曾玉摘要目前,随着计算机网络的的发展,以计算机技术和网络技术为核心的现代网络技术已经在现实生活和生产中得到了广泛的使用,已经成为多数人群的休闲方式,也为多数人所喜好。当然,为了满足没有网络同样能娱乐的要求,许多小游戏做成了单机和网络的双功能。本软件使用JAVA语户端之间的连接,利用多线程技术言实现,通过对图形界面,绘图,布局管理器等去构造出游戏的单机功能,在此基础上,利用SCOKET的知识,建立起服务器与客来处理服务器端与客户端之间的数据传输,通信问题,使得客户端和服务器端之间能够同步的进行处理。通过对软件的编写,更深入的理解了面向对象的概念,也体会到利用面向对象语言处理一些问题的优势。同时也加深了对多线程,流套接字等高级技术的理解。关键词:多线程;流套接字;数据传输;同步。IIIABSTRACTABSTRACTAtpresent,Withtherapiddevelopmentofcomputernetwork.Takingcomputertechnologyandthenetworktechnologyasthecore,modernnetworktechnologyisalreadyusedinthereallifeandtheproductionandalreadybecametheleisuremodeofthemostpeople.Andmostpeoplelikethem.Ofcourse,it’sapitythattherestillhavesomeclientslackingofnetworkbecauseofvariouscauses.Inordertosatisfytheaboveclients’requirements.Alargenumberofgames,usuallynamedas“smallgames”byplayers,aredesignedforinvolvingtwokindsofdifferentfunction.Theformergameisoftenplayedbytheseplayerswhosecomputersneverconnectwiththenetwork.It’scalledforstand-aloneversiongames.Justasitsnameimplies,thelaterisnamedasonlineversiongamesThissoftwareimplementedwithJAVAlanguage,andaccordingtotheunderstandingofSCOKET,GUIandpaintimageichnology.Establishedinthesefoundation,theservercoectswiththemulti-client,andtransmissiontheinformationbetweenmanyclientsusingthemulti-threadproceedingtechnology.itisveryconvenientforbothclientandservertodothesynchronousprocessing.Throughtothesoftwarecompilation,deepenunderstandingandgrasptothetechnologyaboveunderstandingandholding.KeyWords:multiplethread,Socket,transmission-data,synchronism.目录目录第一章绪论...............................................11.1开发背景.......................................................11.2课题意义.......................................................11.3五子棋游戏的发展与现状.........................................21.4论文的组织结构.................................................3第二章五子棋程序相关技术介绍.............................42.1软件的基本功能.................................................42.2开发运行环境...................................................42.3软件的开发手段以及工具的介绍...................................42.3.1Java简介...................................................42.3.2MyEclipse10开发环境简介....................................72.4软件的实现目的.................................................8第三章五子棋程序分析与设计...............................93.1用户需求分析...................................................93.2软件功能结构图.................................................93.3软件各个功能的简要说明........................................103.4软件设计中使用到的JAVA软件包以及类和方法.....................123.5五子棋界面设计...............................................133.6五子棋算法设计...............................................143.6.1五子棋棋盘设计............................................153.6.2棋子设计..................................................163.6.3落子算法设计.............................