JAVA版贪食蛇(贪吃蛇)游戏的设计与实现(含录像)(任务书,开题报告,外文翻译,毕业论文12000字,程序代码,MySQL数据库,答辩PPT,答辩视频录像)
摘要
“贪食蛇”游戏是一款使用Java语言开发的小游戏,它因为界面简洁,操作简单受到广大玩家的推崇。近年来Java作为一种新的高级语言,以其简单、易懂、可移植受到众多编程人员的欢迎,成为一种广泛使用的编程语言。本文基于Java环境和Eclipse开发工具,开发了一个界面美观,操作简单并且功能齐全的“贪食蛇”游戏,整个游戏分为了10个类,实现了游戏的开始、结束、暂停,通过了本游戏的开发,达到了学习Java及Java GUI,熟悉开发软件过程的目的。
本次毕业设计对“贪食蛇”游戏的整个生命周期进行了完整的描述。首先分析了本次毕业设计的可行性,然后进行了游戏的功能需求分析,最后进行了游戏的详细设计,同时为了保证程序的代码正确性以及功能的可靠性,进行了游戏程序的调试与功能测试。通过游戏的开发学习了Java程序开发的相关技术,使用Eclipse开发程序的相关流程,培养了对程序的需求分析以及程序设计的能力。
摘要:贪食蛇,Java,Eclipse
The design and implementation of the game Snake
Abstract
With the Java language , the game Snake, whose interface is simple as well as easy to operate, are respected by the majority of players.
Recently, as a new senior language welcomed by many programmers, Java , which is simple, easy to understand and portable , has been used widely in the field of program editing.
Based on the developing tool Eclipse as well as Java language, editor has developed a Snake game with beautiful interface, easy operation and fully function, which is divided into ten categories to achieve the start, over, pause of the game. Besides, through the progress of the development of the Snake, editor is familiar with software development process and learns about Java and Java GUI at the same time.
The graduation project on the "Snake" describes the entire progress of the game completely .
1.Firstly, analyzes the feasibility of this design;
2.Then, analyzes the game's functional requirements;
3.Finally, finish detailed design of the game.
In order to ensure the correctness of the code and reliability of functional program, editor has tested the game program and its functions.
Through the development of the game Snake, editor is able to learn technologies of the Java application development and related processes of the Eclipse development programs. What ‘s more, owing to this project, train the ability to analyze and design the program.
Keyword: the game Snake,Java,Eclipse
本游戏要完成贪食蛇游戏的基本操作,玩家可以自己进行练习与操作,贪食蛇游戏的GUI界面主要包括图形框架、蛇头蛇身的设计、开始结束按钮以及背景颜色的设置,游戏的主界面简洁明朗,赏心悦目。游戏应该满足一下几点要求:
(1)利用“↑”“↓”“←”“→”实现控制蛇移动的方向
(2)能够随机的产生食物(food)
(3)吃到食物蛇身会变长
(4)除非碰到障碍物(ground)或者蛇身的任意一个地方,蛇死亡,游戏结束,否则游戏继续运行
本软件在设计方面本着方便、简洁、娱乐性高的宗旨,在设计过程中始终明确目标,性能方面力求实现高效率,不易出错等。
目 录
1 引言 …………………………………………………………………………1
1.1 课题背景……………………………………………………………………1
1.2 研究的目的和意义…………………………………………………………1
1.3 国内外研究现状……………………………………………………………1
1.4 开发工具及技术 …………………………………………………………3
1.4.1 Java语言 ………………………………………………………………3
1.4.2 Java平台 ……………………………………………………………………5
1.4.3 JDK工具…………………………………………………………………5
1.4.4 Eclipse开发工具………………………………………………………5
1.4.5 GUI技术简介……………………………………………………………6
1.5 软硬件需求…………………………………………………………………7
1.5.1 硬件需求…………………………………………………………………7
1.5.2 软件需求…………………………………………………………………7
2 系统需求分析 ………………………………………………………………8
2.1 需求分析……………………………………………………………………8
2.2 预期目标……………………………………………………………………8
2.3 系统的可行性分析…………………………………………………………9
2.3.1 技术可行性分析…………………………………………………………9
2.3.2 经济可行性………………………………………………………………10
2.3.3 操作可行性………………………………………………………………10
3 系统功能设计………………………………………………………………11
3.1 系统流程图…………………………………………………………………11
3.2 系统结构图…………………………………………………………………12
3.3 系统类文件…………………………………………………………………12
3.4 蛇的移动……………………………………………………………………13
4 系统详细设计………………………………………………………………14
4.1 主界面设计…………………………………………………………………14
4.2 调整背景颜色界面…………………………………………………………16
4.3 显示网格功能………………………………………………………………17
4.4 设置蛇头颜色………………………………………………………………18
4.5 设置蛇身颜色………………………………………………………………20
4.6 设置食物颜色………………………………………………………………21
4.7 蛇的移速调整………………………………………………………………22
5 系统测试……………………………………………………………………23
5.1 测试的意义…………………………………………………………………24
5.2 测试的过程…………………………………………………………………24
5.3 测试的结果…………………………………………………………………24
结论………………………………………………………………………………25
参考文献…………………………………………………………………………26
致谢………………………………………………………………………………27
|