【正文】
I Java 程序課程設(shè)計任務(wù)書 一、主要任務(wù)與目標 了解圖形用戶界面的概念; 了解 AWT 的基本體系結(jié)構(gòu),掌握窗口的基本原理; 掌握幾種布局管理器的使用方法; 掌握 java 的事件處理機制; 了解 Swing 的基本體系結(jié)構(gòu),掌握 Swing 組件的使用方法; 掌握 java 小程序的工作原理和使用方法; 該游戲還將設(shè)置退出,再來一局按鈕,并實現(xiàn)相應(yīng)的功能。 設(shè)計一個用戶注冊登錄界面 二、主要內(nèi)容與基本要求 游戲規(guī)則是模仿網(wǎng)絡(luò)上普通的連連看游戲,主要是鼠標兩次點擊的圖片能否消去的問題。當前,前提是點擊兩張相同的圖片,若點擊的是同一張圖片或者兩張不同的圖片,則不予處理。在兩張想同圖片所能連通的所有路徑中,如果存在一條轉(zhuǎn)彎點不多于兩個的路徑,就可以消去;如果沒有,則不予處理。 該游戲 由 30 張不同的圖片組成,游戲開始將會出現(xiàn) 30 張隨機組合的圖片,在規(guī)則下點擊兩張相同的圖片后圖片將會消失。圖片全部消完為游戲成功。游戲還將設(shè)置退出,再來一局的按鈕, 和倒計時的功能, 方便用戶進行操作。 并且有一個用戶登錄注冊界面, 玩家必須登錄以后才可以進行游戲。 三、計劃進度 12 月 28 日 ~ 12 月 29 日:課程設(shè)計選題,查找參考資料 12 月 30 日 ~ 12 月 31 日:閱讀參考書籍,收集資料,完成需求分析 1 月 1 日 ~ 1 月 3 日: 系統(tǒng)的代碼設(shè)計及實現(xiàn),數(shù)據(jù)庫設(shè)計與實現(xiàn) 1 月 4 日 ~ 1 月 5 日:系統(tǒng)的調(diào)試,修改,完善 1 月 6 日 ~ 1 月 7 日:完成課程設(shè)計報告,準備答辯 四、主要參考文獻 II [1] 劉寶林 .Java 程序設(shè)計與案例習(xí)題解答與實驗指導(dǎo) [M]. [2] 王鵬 何云峰 .Swing 圖形界面開發(fā)與 案例分析 [M]. [3](美) Karl Avedal , Danny Ayers, Timothy Briggs. JSP 編程指南 [M]. 電子工業(yè)出版社 , 2020,47125. [4](美) Mark Linsenbardt. JSP 在數(shù)據(jù)庫中的應(yīng)用與開發(fā) [M]. 希望電子出版社,2020,210236. [5] Dianne Phelan, Building a simple web database application[C].IEEE International Professional Communication Conference, 2020, 7986. [6](美) Karl Avedal,Danny Ayers,Timothy 編程指南 [M].電子工業(yè)出版社 ,2020,47125. [7] Dianne Phelan, Building a simple web database application[C].IEEE International Professional Communication Conference, 2020, 7986. [8] Altendorf. Eric, Hohman. Moses, Zabicki. Roman. Using J2EE on a large, webbased project[J]. IEEE ,19(02):8189. 摘要 當今社會,休閑型游戲越來越得到人們的喜愛,我所做的畢業(yè)設(shè)計實例“連連看游戲的設(shè)計與實現(xiàn)”是近幾年來網(wǎng)絡(luò)上非常流行的一種二維休閑游戲,它對電腦配置要求不高,娛樂性強,易于上手。 III 此次設(shè)計所使用的語言為 Java語言,開發(fā) 環(huán)境為 JCreator。主要應(yīng)用到 Swing組件, Java 小程序,事件及接口等 。這些接口為游戲的制作提供了便捷的條件,本系統(tǒng)的主要特點就是運用 Swing 組件和事件處理技術(shù) ,進行界面的繪制,鼠標的操作,以及積分的顯示等功能。 這次通過連連看的設(shè)計開發(fā)將對理解 Swing 組件 技術(shù)以及 事件處理 技術(shù)在游戲方面的應(yīng)用起到很大的幫助作用,同時為掌握 Java 編程技術(shù)及二維休閑游戲設(shè)計的一般方法打下堅實的基礎(chǔ)。 本文闡述了實例“連連看”的設(shè)計思想和實現(xiàn)。全文分為 五 章。第一章對選題的背景及項目的功能進行了簡要敘述。第二章介紹了 開發(fā)本系統(tǒng)所使用的 Java語言、 Swing 組件 和 事件處理 技術(shù)。第三章介紹了系統(tǒng)的需求分析。第 四 章則對游戲的各功能模塊及實現(xiàn)算法等詳細設(shè)計進行了介紹。第 五 章對程序運行與調(diào)試中經(jīng)歷的問題和學(xué)到的編程及游戲設(shè)計經(jīng)驗進行總結(jié)。 關(guān)鍵詞 : 游戲 , 連連看 , 二維游戲 ABSTRACT IV Today39。s society, Casual games get more and more popular among people, I did graduate design example, Design and Implementation Lianliankan game is very popular in recent years the work of a twodimensional casual games. Its less demanding puter configuration, Entertaining, Easy to fly. The language used in graduate design language for the Java, Development environment for the JCreator . Mainly applied to the Microsoft Swing framework provides more documentation procedures and events functions to interface. The game interface offers convenient conditions for production, The main features of this system is to use events framework and interface technology to interface mapping, mouse operations, and display functions standings. The design and development by Lianliankan Swing framework will understand the technology and the events application of technology in the games played very helpful, Java programming for both master and twodimensional recreation of the general method of game design and lay a solid foundation. In this paper, examples of Lianliankan The design and implementation. Paper is divided into five chapters. Chapter I of the project background and project a brief description of the function. The second chapter describes the development of this system uses Java language, Swing framework of the technology and Event interface technology. The third chapter describes the system requirements analysis. The fourth chapter of the game39。s various function modules and the detailed design algorithm was introduced. Chapter V of the program is running and debugging the problems experienced and learned programming and game design experience summary. Keywords: Games, Lianliankan, twodimensional game V 目 錄 JAVA 程序課程設(shè)計任務(wù)書 .......................................... I 摘要 .......................................................... II ABSTRACT ..................................................... III 目 錄 .......................................................... V 第 1章 引言 ..................................................... 1 背景 ...................................................... 1 課程設(shè)計內(nèi)容 .............................................. 1 任務(wù)分工 .................................................. 2 2章 連連看游戲界面 .............................................. 2 連連看游戲概述 ............................................ 2 連連看游戲的規(guī)則 ................................... 3 連連看勝利與失敗條件 ................................ 3 連連看系統(tǒng)介紹 ............................................. 4 本章小結(jié) .................................................. 5 第 3章 連連看游戲的設(shè)計 .......................................... 5 系統(tǒng)需求分析 .............................................. 6 系統(tǒng)開發(fā)及運行環(huán)境 ......................................... 6 系統(tǒng)主要功能要求 ........................................... 6 連連看系統(tǒng)總體結(jié)構(gòu) ................................. 7 連連看系統(tǒng)各模塊介紹 ................................ 7 本章小結(jié) .................................................. 9 第 4章 系統(tǒng)的具體實現(xiàn) ........................................... 9 界面設(shè)計 ................................................. 10 用戶登陸界面圖 ..................................... 10 注冊界面 .......................................... 13 VI 系統(tǒng)界面 .......................................... 16 執(zhí)行界面 .......................................... 17 程序設(shè)計及調(diào)試運行 ........................................ 26 游戲的連接算法 ..................................... 26 JFreeChart ........................................ 29 第 5章 結(jié)束語 .................................................. 31 致 謝 .......................................................... 32 參考文獻 .......