扫雷java程序算法设计_基于Java的Windows扫雷游戏的设计与实现毕业论文+任务书+翻译及原文+源码+辅导视频...

本文介绍了一款基于Java和Eclipse开发的Windows扫雷游戏,详细阐述了设计思路、流程规划、界面设计、算法应用以及游戏的详细实现,包括雷区布局、鼠标事件处理、递归算法在清除无雷格子中的应用等。同时,文章讨论了游戏的可行性分析、功能需求和界面需求,涵盖了不同难度选择和游戏成功的判断条件。
摘要由CSDN通过智能技术生成

基于Java的Windows扫雷游戏的设计与实现

摘 要

扫雷这款游戏有着很长的历史,从扫雷被开发出来到现在进行了无数次的优化,这款游戏变得越来越让人爱不释手了,简单的玩法在加上一个好看的游戏界面,每一处的细节都体现了扫雷的魅力。所以本次的毕业设计我将开发一款扫雷游戏。

本次毕业设计是以JAVA语言作为开发环境,使用Eclipse设计并开发一个类似Windows扫雷的游戏,实现其基本功能。论文首先介绍了课题背景,其次进行了需求分析及可行性分析;然后设计游戏流程,介绍雷区中的雷怎么安放和产生雷的随机算法;最后介绍游戏中可能会触发的各种时间,比如鼠标点击时间和清理掉没有雷的格子,其中鼠标事件包括点击到或没有点击到雷触发的事件和点击到重新开始以及菜单触发的事件,清理掉没有雷的格子就需要使用“递归”的方法来使该功能可以简单的实现。

关键词:扫雷;Eclipse;事件;递归

Design and Implementation of Mine Game

Abstract

Mine the game has a long history, from the mine was developed to now numerous optimization, the game is becoming more and more let a person fondle admiringly, simple style with a nice game interface, every detail reflects the charm of mine. So I'm going to develop a minesweeper game.

The graduate design study was designed with the JAVA language as a development environment, using Eclipse to design and develop a game like Windows minesweeper to implement its basic functions. The paper firstly introduces the background of the project and analyzes the requirements and feasibility analysis. Then the game process was designed to introduce the random algorithm of how the thunder in the minefield was placed and produced. Finally introduced the game may trigger a variety of time, such as a mouse click on the clear time and there is no ray of diamonds, mouse events including click to or no click to ray trigger events and click to restart and menu trigger events, clearing out squares no ray will need to use the "recursive" methods to make the function can be simple to implement.

Key words: Mine game; Visual Basic 6.0; Affairs; Recursion

目  录

摘 要i

Abstractii

1绪论1

1.1课题背景及意义1

1.2开发工具的选用及介绍1

1.3选题目的和意义2

1.4本文主要研究的内容2

2需求分析3

2.1可行性分析3

2.2扫雷游戏功能描述3

2.3扫雷游戏用例图4

2.4扫雷游戏功能需求4

2.5扫雷游戏界面需求5

2.6扫雷游戏功能模块6

3游戏的概要分析与设计7

3.1设计构想7

3.2流程规划8

3.3界面规划9

3.4算法思想9

4游戏的详细设计11

4.1游戏初始化11

4.2雷区的布置12

4.3游戏中主要模块的介绍与使用13

4.3.1鼠标事件13

4.3.2地雷及雷区表面探测情况14

4.3.3清除未靠近地雷的格子15

4.3.4游戏难度的选择16

4.3.5菜单栏的功能16

4.4游戏的判断16

4.4.1游戏成功完成16

4.4.2游戏失败16

4.5类设计17

4.5.1MineGame类17

4.5.2Block类18

4.5.3BlockView类19

4.5.4Record类20

4.5.5ShowRecord类21

4.5.6MineArea类22

4.5.7LayMines类23

5游戏实现25

5.1游戏难度自定义25

5.2扫雷28

5.2.1玩家通过右键进行扫雷,并显示小红旗28

5.2.2玩家因触碰到雷而导致游戏结束29

5.2.3玩家扫雷成功29

5.2.4玩家游戏数据显示30

5.3程序打包发布过程32

6游戏测试结果33

6.1游戏难度自定义测试33

6.2扫雷测试35

6.3玩家游戏数据显示测试37

6.4游戏数据显示区测试39

6.5递归算法测试43

结    论44

参考文献45

致    谢47

外文原文48

中文翻译55

c12acdae90224a1e9673360bd15c208c.png

2aadb2f79f55ca63bf34a48c5bc17d0a.png

36e77a134826dc477df2d9daa7ee530f.png

7076204f978f022eefce272758e40b40.png

c7baaf7df8cb3a351108ae8962ad4b58.png

fbbf5e6e8e36027078d7312268bcd14c.png

4ef1085f7e6ea169b1c34dbff08fb70b.png

93a1059c8a57ebc339f6125f708c554a.png

857e5857875c38d3e37f1273273a5e84.png

daeb412a3ffa9bc747c838b84a00cfe8.png

256f6dc22bd49ddfe8d92c4ea2f7bcb5.png

b9457a957e0f763c4fb56b27de5f8719.png

5359739d192da6b0f180210ec3acaaa5.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值