毕业论文 基于j2me的手机五子棋游戏的设计与实现.doc
毕业论文 基于j2me的手机五子棋游戏的设计与实现,毕业论文 基于j2me的手机五子棋游戏的设计与实现基于j2me的手机五子棋游戏的设计与实现摘 要:j2me(java 2 micro edition)是近年来随着各种不同设备,尤其是移动通信设备的飞速发展而诞生的一项开发技术。它因其“write once,run anywhere”的java特性而提高了开发的效率。随着...
内容介绍
此文档由会员 lanxin520 发布毕业论文 基于J2ME的手机五子棋游戏的设计与实现
基于J2ME的手机五子棋游戏的设计与实现
摘 要:J2ME(Java 2 Micro Edition)是近年来随着各种不同设备,尤其是移动通信设备的飞速发展而诞生的一项开发技术。它因其“write once,run anywhere”的Java特性而提高了开发的效率。随着手机性能的不断提高,手机休闲娱乐应用将成为PC休闲娱乐应用之后又一重要业务增长点。棋类游戏规则单一,比较适合在手机等便携终端推广。
由于具有跨平台、易于移植、占用空间小的优势,J2ME成为移动应用开发平台的主流,并提供了很多用以支持移动应用软件的开发的API。现将该技术用于这次的手机游戏开发,可以实现游戏的快速开发,不但便于查看游戏运行过程中内存的占用量和程序的每一部分代码消耗了多少处理器时间,而且可以不断地优化代码,使代码具有高度的复用性、可扩展性、可维护性。
游戏的开发以J2ME为平台,利用Java技术,结合J2ME的MIDP技术,并对于程序设计思想,重要类、方法等展开讨论。在对弈部分,分析设计走棋算法,选择合适的方式组织成代码,实现基本的人工智能。过程中使用了J2ME中的CLDC/MIDP软件体系,主要运用了MID Profile的特定类的支持,来完成游戏的开发。
关键词:J2ME;CLDC;MIDP
Design and Implementation of Gobang Cell-phone Game
Based on J2ME
Abstract: J2ME is a kind of fast developing technology implemented on various devices especially mobile communication equipments. It improves the efficiency of the development process because of its "write once, run anywhere" nature. The development trend of the entertainment market based on the cell phone is very obvious because the handset performance enhances unceasingly. The entertainment market based on the cell phone will to be the new important business growth point follow the PC entertainment market. As the rules of a single chess game, it is more suitable for mobile phones and other portable terminal extension.
J2ME has been the preferred platform for development because of its platform independent and compatibility, and provides a lot of APIs to support the development of mobile application software. The technology for mobile game development, can achieve the rapid development of the game. It is not only easy to observe the memory consumption and processor consumed time during the operation of the game, but also can optimize the code, so that the code has a high degree of reusability, scalability, maintainability.
The game has designed by J2ME, the Java technology and the MIDP technology. I studied the procedure thought, the important class and the method. In the playing chess part, I have analyzed the algorithm, choosed the appropriate way to organize the code and realized the basic artificial intelligence. On the other hand, I learned software system of CLDC/MIDP and the specific class of the MID Profile to complete the game development.
Key words: J2ME;CLDC;MIDP
目 录
1 概述 1
1.1 课题研究背景 1
1.2 课题研究意义 2
2 开发技术背景 2
2.1 JAVA语言概述 2
2.2 J2ME简介 3
2.3 J2ME的体系结构 4
2.4 移动信息设备简表 7
2.5 开发平台 8
3 系统分析及总体设计 9
3.1 可行性分析 9
3.2 需求分析 9
3.3 系统概要设计 10
4 系统详细设计 13
4.1 界面设计 13
4.2 走棋算法 27
4.3 胜负判断 29
5 系统测试 30
5.1 测试方案 30
5.2 测试结果 30
6 结 束 语 35
参考文献 36
致 谢 37
附 录 38
附录1 程序清单 38
附录1.1 StartGame.java程序清单 38
附录1.2 Chesses.java程序清单 39
附录1.3 Chessboard.java程序清单 44
附录1.4 其它程序清单 49