基于 android 系统的斗地主游戏的设计
专 业:软件工程
二 O 一二年六月
Design and Implementation of Landlords
game based on android
摘 要
Android 是基于 Linux 为核心的操作平台,大部分应用于手机与平板电脑
上,作为一款开放式的操作系统,在 android 的快速发展下,允许 android 开
发者使用多门语言来开发安卓应用程序,而不仅仅局限于以前的只能使用 java
语言来开发,因而备受开发者的欢迎,已经真正意义上成为了开放式的开发平台 。
随着 Android 越来越普遍的出现在当今的主流手机上,越来越多的软件应
用或游戏有了他们基于 Android 的版本,本游戏也是其中之一。斗地主是人们日
常生活中最常玩的游戏之一,而把这款手欢迎的游戏移植到安卓手机上,使人们
能够随时畅游其中,更添加了其乐趣。
作者依据软件工程开发原则,从开发计划、需求分析、概要设计、详细设
计、数据库设计、测试分析、项目开发总结等几个方面详述的阐明了本游戏的开
发过程。但都需要通过大量的运算来将其功能实现。比如说牌发完后的排序,就
要按照花色、大小、王牌来排 本游戏是基于 Android 操作平台设计,使用开发
工具为 Eclipse + SQLITE。以前作者也会和很多人一样,认为一款习以为常的
斗地主游戏是多么的简单,但此次亲身经历后,才发现其中所涉及的知识面之广 、
函数量之大,每一个工具、每一个步骤,看似按部就班,实则均需底层众多代码
量来实现。单就扑克的排序,这就要涉及到排序函数的嵌套问题;打牌也有要符
合要求的牌才能打出,并且根据打出牌的数量来判断其牌的形式,最后来判断其
与上家牌的大小,电脑 Ai 也有一套属于其自身的算法;每一局打完后,游戏都要
把这局的计分给统计保存下来,数据库就成了保存数据了最有效利器,作者选用
了 SQLITE 这款轻量级的数据库,使其不会占用太多的内存。
综上,一款 Android 斗地主游戏不仅需要对 java 编程有一定的基础,而
且图形界面、数据库计算方法等等方面均要有一定的掌握,作者边学边练完成了
这款游戏的设计,可能其中会有一些不尽如人意的地方,还请谅解
关键字:斗地主,android 游戏,游戏设计,手机游戏
重庆大学本科学生毕业设计(论文) ABSTRACT
ABSTRACT
Android is a Linux-based operating platform which is mostly used in mobile
phones and Tablet PC, As an open operating system, the rapid development of the
android allowing the android developers to use more and more language to develop the
Android applications rather than only using java language , so it's well popular on
developers, android has become a true sense of the open development platform.
With the android increasingly common in today's mainstream mobile phone, more and
more software applications or games has been based on the android version. this game
is one of them. Landlords is one of the most frequently play game in the daily lives of
people, but we can transplant the game on the android phone, so that people can play it
at any time ,that can add more fun to us.
I based on software engineering development principle, from the several aspects of
development plan, needs analysis, general design, detailed design, database design, test
and analysis, project development summarizes clearly detail the development process of
this game. But it all need through a lot of operations to realize the function. For
example, brand after sending the order is about to designed on color, this game is based
on android operating platform, use the development tools for eclipse + SQLITE.
The same as the author, many people think a familiar landlord game is a very easy
thing to design but after I experienced the development of the game by myself. just I
detect its involves the wide range of knowledge, the great number of letter, every step
seems to step by step, but in fact are required too many underlying code to achieve ,
such as sort of poke , which would be related to the sorting function nested; cards are
also need to meet the requirements of a license to play. and accounting the number of
new licenses to determine the its form of brand .at last its determine with the home
brand size, computer Ai has a set of algorithm belonging to its own; each game finished,
the Bureau of scoring of the game must be put to the statistics saved, the database is
used to save the data as the most effective weapon .the choice of SQLITE lightweight
database models, because it does not take up too much memory.
In summary, an android landlord game requires not only have a good master of Java
programming and also the graphical interface, database and calculation methods, etc.
Author to learn while practicing complete the design of the game may have some not
wholly satisfactory place, please also understanding
Key words:Landlords, android games, game design, mobile games.
重庆大学本科学生毕业设计(论文) 目录
目 录
中文摘要 ................................. ERROR: REFERENCE SOURCE NOT FOUND
ABSTRACT ............................. ERROR: REFERENCE SOURCE NOT FOUND
摘 要..................................................................................... 2
ABSTRACT............................................................................4
ANDROID IS A LINUX-BASED OPERATING PLATFORM WHICH
IS MOSTLY USED IN MOBILE PHONES AND TABLET PC, AS AN
OPEN OPERATING SYSTEM, THE RAPID DEVELOPMENT OF
THE ANDROID ALLOWING THE ANDROID DEVELOPERS TO
USE MORE AND MORE LANGUAGE TO DEVELOP THE
ANDROID APPLICATIONS RATHER THAN ONLY USING JAVA
LANGUAGE , SO IT'S WELL POPULAR ON DEVELOPERS,
ANDROID HAS BECOME A TRUE SENSE OF THE OPEN
DEVELOPMENT PLATFORM...................................................4
WITH THE ANDROID INCREASINGLY COMMON IN TODAY'S
MAINSTREAM MOBILE PHONE, MORE AND MORE SOFTWARE
APPLICATIONS OR GAMES HAS BEEN BASED ON THE
ANDROID VERSION. THIS GAME IS ONE OF THEM.
LANDLORDS IS ONE OF THE MOST FREQUENTLY PLAY GAME
IN THE DAILY LIVES OF PEOPLE, BUT WE CAN TRANSPLANT
THE GAME ON THE ANDROID PHONE, SO THAT PEOPLE CAN
PLAY IT AT ANY TIME ,THAT CAN ADD MORE FUN TO US......4
I BASED ON SOFTWARE ENGINEERING DEVELOPMENT
PRINCIPLE, FROM THE SEVERAL ASPECTS OF DEVELOPMENT
PLAN, NEEDS ANALYSIS, GENERAL DESIGN, DETAILED
DESIGN, DATABASE DESIGN, TEST AND ANALYSIS, PROJECT
DEVELOPMENT SUMMARIZES CLEARLY DETAIL THE
DEVELOPMENT PROCESS OF THIS GAME. BUT IT ALL NEED
THROUGH A LOT OF OPERATIONS TO REALIZE THE
FUNCTION. FOR EXAMPLE, BRAND AFTER SENDING THE
ORDER IS ABOUT TO DESIGNED ON COLOR, THIS GAME IS
BASED ON ANDROID OPERATING PLATFORM, USE THE
DEVELOPMENT TOOLS FOR ECLIPSE + SQLITE.....................4
THE SAME AS THE AUTHOR, MANY PEOPLE THINK A
FAMILIAR LANDLORD GAME IS A VERY EASY THING TO
DESIGN BUT AFTER I EXPERIENCED THE DEVELOPMENT OF