資源描述:
《掃雷游戲畢業(yè)設(shè)計論文》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫。
1、導(dǎo)題系專班姓學(xué)指日濟(jì)源職業(yè)技術(shù)學(xué)院畢業(yè)設(shè)計(論文)目基于Qt的掃雷游戲設(shè)計別信息工程系業(yè)計算機(jī)應(yīng)用技術(shù)級計應(yīng)1002班名?;壅涮?0090224教師李攀期二零一二年九月基于Qt的掃雷游戲設(shè)計總計:畢業(yè)設(shè)計(論文)25頁圖表10幅掃雷游戲是一款經(jīng)典的小游戲,這款游戲不僅可以讓人們充分享受娛怎的目的,而且可以通過這款小游戲開發(fā)人的邏輯推理能力和判斷能力。木次畢業(yè)設(shè)計我們以Qt4.6為開發(fā)環(huán)境,設(shè)計并開發(fā)了基于Qt的掃雷游戲。掃雷游戲主要研究以下兩個方面:第一是初始化問題,包括隨機(jī)產(chǎn)生本局游戲屮的雷數(shù),雷的分布對于每個小區(qū)域如何獲得周圍地區(qū)分布的雷數(shù)等等。第二就是對鼠標(biāo)事件的處理,即在游戲過程中對鼠
2、標(biāo)事件應(yīng)如何做出反應(yīng)。木論文以Qt作為開發(fā)軟件,首先使用信號與槽的方法實現(xiàn)菜單、工具欄的功能,其次乂以MousePressEvent鼠標(biāo)事件發(fā)出信息來了解使用者的意圖,進(jìn)而做岀相對應(yīng)的動作,再次介紹了清除地雷區(qū)方塊的方法,通過遞歸程序的編寫,在程序代碼上會變得相當(dāng)簡潔。最后利用布局管理組(Layouts)進(jìn)行整體布局。使用C++語言設(shè)計完成了掃雷游戲的初始化界面,實現(xiàn)了掃雷游戲的計吋、重新開始、難度設(shè)置、排行榜、幫助等功能。述增加了游戲在成敗時彈出對話框等功能??偟膩碚f本次設(shè)計在功能上已經(jīng)基本達(dá)到預(yù)期的耍求。但述冇一些不足,比如掃雷游戲設(shè)計還可以添加一些背景音樂、背景圖片、視頻等功能,更能增加
3、人們的娛樂性。關(guān)鍵詞:掃雷游戲;Qt;C卄ABSTRACTMinesweepergameisaclassicgame,thegamecannotonlyallowpeopletofullyenjoytheentertainmentpurposes,andbythissmallgamedevelopmentlogicalreasoningabilityandjudgment.ThegraduationprojecttoQt4.6developmentenvironment,designanddevelopmentofQt-basedgameofMinesweeper.Theminesweeper
4、gamethefollowingtwoaspects:Thefirstistheinitializationproblems,includingrandomlygeneratednumberofCouncilGameRayRaydistributionforeachsmallareahowtogetaroundthegeographicaldistributionofRay.Thesecondistheprocessingofmouseevents,mouseeventsinthecourseofthegamehowtoreact.Inthisthesis,QTsignalsandslotsa
5、sthedevelopmentofsoftware,thefirsttousethemethodtoachievethefunctionalityofthemenus,toolbars,followedYouyimousePressEventmouseeventsissuedinformationtounderstandtheuser'sintent,andthenmakeacorrespondingaction,againintroducedaclearMinefieldsboxbyrecursiveprogramcodewillbecomequitesimple.Finally,theth
6、elayoutmanagementgroup(Layouts)overalllayout.Completedminesweepinggamesinitializationinterfacedesign,toachieveamine-sweepinggameoftiming,startagain,difficultysettings,rankings,helpfunctionsusingtheClanguage.Gameinthesuccessorfailureofthepop-updialogbox.Overall,thedesignfunctionhasbasicallyreachedthe
7、expectedrequirements.Buttherearesomedisadvantages,suchasminesweepinggamedesigncanalsoaddsomebackgroundmusic,backgroundimage,video,andcanhelpincreasepeople'sentertainment.Keywords:Minesweepergame;Qt;C+