資源描述:
《貪食蛇游戲_學(xué)位論文.doc》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫。
1、Java版貪食蛇游戲-GUI界面設(shè)計(jì)模塊摘要近年來Java作為一種新的編程語言,以其簡(jiǎn)單性、可移植性和平臺(tái)無關(guān)性等優(yōu)點(diǎn),得到了廣泛地應(yīng)用,特別是Java與萬維網(wǎng)的完美結(jié)合,使其成為網(wǎng)絡(luò)編程和嵌入式編程領(lǐng)域的首選編程語言。MyEclipse是Genuitec公司用于快速開發(fā)Java應(yīng)用的一款優(yōu)秀的集成開發(fā)環(huán)境,它以其友好的開發(fā)界面、強(qiáng)大的組件支持等優(yōu)點(diǎn),得到廣大程序員的接受和認(rèn)可?!柏澇陨摺庇螒蚴且粋€(gè)經(jīng)典的游戲,它因操作簡(jiǎn)單、娛樂性強(qiáng)而廣受歡迎。本文基于Java技術(shù)和MyEclipse6.0開發(fā)環(huán)境,開發(fā)了一個(gè)操作簡(jiǎn)單、界面美觀、功能較齊全的“貪吃蛇”游戲。整個(gè)游戲程序分為二個(gè)
2、功能模塊,六個(gè)類模塊,實(shí)現(xiàn)了游戲的開始、暫停、結(jié)束。通過本游戲的開發(fā),達(dá)到學(xué)習(xí)Java技術(shù)和熟悉軟件開發(fā)流程的目的。本游戲開發(fā)采用的技術(shù)和方法,對(duì)目前游戲類軟件開發(fā)有一定的指導(dǎo)意義。本次畢業(yè)設(shè)計(jì)的目的在于學(xué)習(xí)Java程序設(shè)計(jì)基本技術(shù),學(xué)習(xí)用MyEclipse開發(fā)Java程序的相關(guān)技術(shù),熟悉游戲“貪吃蛇”的需求,熟悉項(xiàng)目開發(fā)的完整過程。學(xué)會(huì)怎樣進(jìn)行一個(gè)項(xiàng)目的需求分析、概要設(shè)計(jì)、詳細(xì)設(shè)計(jì)等軟件開發(fā)過程,熟練地掌握J(rèn)ava程序設(shè)計(jì)的基本技術(shù)和方法,熟練地掌握MyEclipse工具的使用方法,培養(yǎng)起初步的項(xiàng)目分析能力和程序設(shè)計(jì)能力。關(guān)鍵詞:MyEclipse,Java,“貪吃蛇”游戲
3、TheJavaVersionofGluttonySnakeGame-theModuleofGUIImplementationABSTRACTWiththecomingofthe21stcenturyinformationsociety,inpeople'sworkandlife,wemoreandmorearerequiredtodealwiththecomputer.Inthebusydailylife,theuseruseallkindsofcasualgamesrelax.Althoughthereareallkindsofonlinegamesnow,butthema
4、rketofgluttonysnakeisconsiderable.Becauseofitsspecialisthatattractpeoplemoredeeply,fondleadmiringly.Asthegamespeedaccelerating,itsstimulatingdegreeisstronger.Itsadvantageissimple.Whetheramobilephoneoracomputer,canrunquickly.Formodernpeople,can'tspendalotoftimeonentertainment,largegamedoesn'
5、twork,Littlegamescomplywiththeirdemands.GluttonysnakegamesarewrittenintheJavalanguage,thedevelopmenttoolsistheEclipse.Javaisasimple,object-oriented,distributed,explanatory,portability,multi-threaddynamiclanguages.Basedontheobject-orientedandportabilityofJava,gluttonysnakegameuseitasadevelop
6、mentlanguage.Eclipseisanopensource,extensibledevelopmentplatformbasedonJava.Forthroughplug-ins,componentstobuildthedevelopmentenvironment.Thesystemmainlycompletethebasicoperationofthegluttonysnakegame,theusercanpracticeandenjoy.Thissystemneedstomeetthefollowingrequirements,:usethedirectionk
7、eytochangetherunningdirectionofsnake,theblankspacekeytopauseortocontinuethegame,theEnterkeytostartanewgame,PgUp,PgDntochangetherunningspeedofthesnake,andtherandomplacetoproducefood,eatthefoodwillproducenewsnakebody,touchingthewallorthemselvesaregameover.