摘 要
近年来,Java作为一种新的编程语言,以其简单性、可移植性和平台无关性等优点,得到了广泛地应用,特别是Java与万维网的完美结合,使其成为网络编程和嵌入式编程领域的首选编程语言。eclipse是IBM公司用于快速开发Java应用的一款优秀的集成开发环境,它以其友好的开发界面、强大的组件支持以及开源等优点,得到广大程序员的接受和认可。
"贪吃蛇"游戏是一个经典的游戏,它因操作简单、娱乐性强而广受欢迎。本文基于Java技术和eclipse开发环境,开发了一个操作简单、界面美观、功能较齐全的"贪吃蛇"游戏。整个游戏程序分为二个功能模块,八个类模块,实现了游戏的开始、暂停、结束。通过本游戏的开发,达到
学习Java技术和熟悉软件开发流程的目的。
本文在介绍Java相关技术和国内外发展现状的基础上,对"贪吃蛇"游戏的整个生命周期的各个开发阶段进行了详细地介绍。首先,分析了开发本游戏软件的可行性,重点分析本设计所采用的技术的可行性。其次,从游戏主界面等几方面,分析了本游戏的功能需求;从可使用性和安全性方面分析了属性需求。然后,进行了游戏的概要设计和详细设计,这也是本文的重点。概要设计给出二个功能模块的主框架以及八个类模块的函数调用关系;详细设计介绍了Java2标准运行环境的配置,重点给出各个类模块的程序
列表,介绍了各个类包含的变量、使用的方法,展示了游戏的界面。为了保证程序代码的正确性和功能实现的可靠性,本文还介绍了游戏软件的程序调试过程和功能测试结果。
关键词:Java;eclipse;贪吃蛇;开发流程
Snake game design and development
Abstract
In recent years, Java, as a new programming language, with its simplicity, portability and platform independence and other advantages, had been used widely, especially Java and the perfect combination of the world wide
web, to make it a network programming and embedded programming field preferred programming language. Eclipse is IBM used for fast development Java application of a good integrated development environment, with its friendly development interface, powerful components support and open source etc, and receive the accepted and approved by the programmer.
"Snake" game is a classic game, it was simple operation, strong and popular entertainment. This paper, based on the Java technology and eclipse development environment, develop a simple operation, interface aesthetics, the function is more complete "snake" game. The whole game program is divided into two function module, eight class module, realize the games to begin, pause, over. Through the development of the game, to learn Java technology and familiar with the purpose of the software development process.
Based on the introduction of Java related technology and the domestic and foreign development present situation, on the basis of "snake" game of the whole life cycle of each development phases are introduced in detail. First of all, analyzes the feasibility of this game software development, this paper ana