基于JAVA技术的俄罗斯方块游戏的设计与实现

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

目录

摘要 (1)

关键词 (1)

1 前言 (2)

2 需求分析 (3)

2.1 系统开发环境 (3)

2.2 系统玩法及规则 (3)

2.3 系统设计分析 (4)

2.4 注意事项 (5)

3 概要设计 (5)

3.1 系统介绍 (5)

3.2 系统简单设计 (6)

3.3 系统功能设计 (6)

3.4 系统流程 (8)

4 系统详细设计 (9)

4.1 设计游戏框架 (9)

4.2 设计游戏界面 (13)

4.3 游戏内容设计 (14)

4.3.1 方块描述 (14)

4.3.2 地图描述 (16)

4.3.3 地图方块阻碍描述 (16)

4.3.4 满行判断及删除 (16)

4.3.5 线程控制的实现 (17)

4.3.6 控制游戏开始 (17)

4.3.7 控制游戏暂停 (17)

4.3.8 控制游戏结束 (17)

4.3.9 控制方块自动下降 (18)

4.3.10 预备方块区的上移效果 (19)

4.3.11 键盘事件处理 (19)

4.4 游戏其它功能的实现 (20)

4.4.1 添加状态栏 (20)

4.4.2 添加关于对话框 (20)

4.4.3 添加音响效果 (22)

4.4.4 得分情况封装 (23)

4.4.5 成绩的录入 (25)

5 系统实现 (28)

5.1 登入界面 (28)

5.2 游戏主界面 (28)

5.3 游戏结束显示框 (29)

5.4 成绩排行榜 (30)

6 系统测试 (30)

6.1 测试举例 (30)

6.2 测试项目 (31)

6.3 测试方法 (32)

7 设计小结 (33)

7.1 出现的问题及解决方法 (33)

7.2 游戏存在的不足 (35)

7.3 结论 (35)

参考文献 (36)

致谢 (37)

附录 (38)

基于JAVA技术的俄罗斯方块游戏的设计与实现

摘要:俄罗斯方块是一款非常经典的游戏,曾经风靡全球,经久不衰,相信不少人都玩过,同时也是我们学习面向对象编程思想的理想实例。现在面向对象的编程语言很多,都可以通过编程来实现。本设计介绍的是用Java语言设计一个俄罗斯方块游戏的全过程,整个游戏系统是一个应用程序,不再是嵌入到网页里的那种小应用程序,并使用了 Swing组件,使得界面更具有专业效果。游戏设计过程中涉及到游戏框架、游戏界面的编写、菜单处理、变量的定义、算法设计以及预览功能的实现。同时,还为游戏添加了其他功能,如设计About对话框,实现游戏分数的存档,为游戏添加状态栏等。通过本次毕业设计可以学到如何定义类和类成员及其方法;并如何使用JBuilder来创建工程;如何创建一个对话框,并将对话框和主应用程序联系起来共同使用。

关键词:俄罗斯方块; Java;应用程序; Swing组件

The Design And Implementation Of A Tetris Game Based On Java

Technology

Abstract: Tetris is a classic and durable game, and it has been popular all over the world. Believeing it has been played many of people. and meanwhile it’s an ideal sample for leaning object-oriented programming. It can be implemented by different object-oriented programming languages that exists nowadays. This thesis describes the implementing process of this game in java language, which is implemented in application form instead of applet that embedded in the web pages. The use of swing component makes the interface look more professional.The process of game programming involves the design of game frame and game interface, menu design, the definition of variable, arithmatic design and the implementation of preview function. Meanwhile, others are also added, such as the About dialog, status bar, and the function of game scores saving. A lot can be learned in the process of programming, such as how to define the classes and its members and functions, how to build a project in JBuilder, and how to implement a dialog box, and how to connect dialog box to the main frame of using together.

相关文档
最新文档