【计算机软件毕业设计】基于Java的俄罗斯方块的设计与实现 下载本文

内容发布更新时间 : 2024/6/24 19:37:20星期一 下面是文章的全部内容请认真阅读。

河北农业大学 本科毕业论文

题 目:基于Java的俄罗斯方块的设计与实现

摘要

俄罗斯方块作为一款风靡全球的多样化终端游戏,经久不衰。俄罗斯方块简单的基本游戏规则是旋转、移动,游戏自动随机输出7种形状的方块,经旋转后可形成28种形状,方块堆叠在一起,排列成完整的一行或多行消除得分,积分达到一定程度会自动提升级别。该游戏上手简单、老少皆宜、家喻户晓。

本论文在详尽分析传统俄罗斯实现的基本原理、基本规则基础上,更深一步地研究俄罗斯方块的创新模式,在经典模式基础上开发出等级可变的模式,本文对以上功能给出了实现流程、详尽描述、和部分源代码。程序是在Microsoft Windows 7系统下,以Java为开发语言,在MyEclipse开发平台上进行游戏的设计与实现。 关键词:游戏;软件工程;MyEclipse

Abstract

Tetris is a popular global diversification terminal game, enduring. The basic rules of the game Tetris simple is rotating, moving, the game automatically random output 7 shape box, the rotation can be formed after the 28 square shape, stacked together, arranged to complete one or more rows to eliminate the score, the integral to a certain extent will automatically upgrade the level of. The game started simple, suitable for all ages, make known to every family.

In this paper a detailed analysis of the basic rules of traditional Russian basic principle, on the basis of the realization of innovation mode, further study of Tetris, developed a class variable model in the classical model, the above function gives the implementation process, detailed description, and part of the source code.This design is in the Microsoft Windows 7 system, taking Java as the development language, for game design and Implementation on MyEclipse platform.

Keywords: Game; software engineering; MyEclipse

目录

1 绪论 .................................................................................................................................................................. 1

1.1 俄罗斯方块游戏的背景 ...................................................................................................................... 1 1.2 俄罗斯方块游戏的规则 ...................................................................................................................... 1 1.3 研究俄罗斯方块游戏的意义 .............................................................................................................. 1 1.4 论文组织 .............................................................................................................................................. 2 2 相关技术分析 .................................................................................................................................................. 3

2.1 JAVA语言概述 ..................................................................................................................................... 3 2.2 Eclipse简介 ....................................................................................................................................... 4 3 需求分析 .......................................................................................................................................................... 6

3.1 系统需求 .............................................................................................................................................. 6 3.2 接口控制 .............................................................................................................................................. 6 4 系统设计 .......................................................................................................................................................... 7

4.1 软件运行和开发工具 .......................................................................................................................... 7 4.2 系统功能设计 ...................................................................................................................................... 7

4.2.1 手工处理业务的基本流程 ...................................................................................................... 7 4.2.2 基本流程的功能模块 .............................................................................................................. 9

5 系统实现 .........................................................................................................................................................11

5.1 游戏主界面显示模块 .........................................................................................................................11 5.2 画布、方块显示模块 ........................................................................................................................ 12

5.2.1 背景画布模块设计 ................................................................................................................ 12 5.2.2 预览方块模块设计 ................................................................................................................ 14 5.2.3方块移动、旋转设计 ............................................................................................................. 16 5.3 控制面板模块 .................................................................................................................................... 20

5.3.1菜单栏模块设计 ..................................................................................................................... 20 5.3.2控制面板按钮设计 ................................................................................................................. 22

6 总结 ................................................................................................................................................................ 23 参考文献 ............................................................................................................................................................ 24 致谢 .................................................................................................................................................................... 25