登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 计算机科学与技术 > 正文

一个基于安卓平台的五子棋游戏的设计与实现

 2023-03-04 10:03  

论文总字数:17853字

摘 要

随着互联网技术的大力发展,我们的生活也有了翻天覆地的改变。在移动终端大为普及的今天。以Linux为基础的Android代码因为它的开源性,在很短的时间里伫立到了智能机的顶端,因而现在用Android来开发软件,特别是游戏软件符合市场的需求,很有必要性。

本论文主要阐述基于智能手机Android系统之上,以面向对象的java程序开发语言,Eclipse为开发工具而设计的一个五子棋游戏。本系统设定了人机对战模式和人人对战模式,共分为初始化、循环控制、界面绘制、玩家落子、分析棋面和电脑落子、胜负判断这六个主要的功能模块。其中最有特色的是分析棋面和电脑落子模块,该功能模块的主要设计思想是系统利用启发式的搜索方法来分析电脑方和玩家方的棋型,在多次分析的结果基础上,找出最有利于己方的位置来落子,直到一方取得游戏胜利。本次游戏的设计在各个功能模块有机结合的基础上力求运行流畅,人机对战模式可玩性强。因此人机部分启发式搜索算法的讨论是本文重点阐述的内容。

本次设计的五子棋游戏经过系统的功能测试,在Eclipse指定版本和分辨率的Android虚拟设备上达到了交互界面友好,两种游戏模式功能完备,胜负判断快速准确的游戏效果。

关键词:Android;Java;五子棋游戏;启发式搜索

Design and implementation of five-in-a-row game based on Android

Abstract

With the vigorous development of Internet technology, our lives have been dramatically changed. In the mobile terminal greatly popular today. Linux-based Android because of its open source code, in a very short period of time standing to the top of the smart machine, so use Android to develop software in line with market demand is great necessity.

This thesis describes the phone based on the Android system to java object-oriented programming language, Eclipse development tools for the design of a five-in-a-row game. This system set a human-machine mode and everyone mode, there are six major functional modules: initialization module, interface drawing module, the main loop control module, the players move later module, surface and computer chess move later modules, the outcome judgment module. the most characteristic modules is analysis and the computer move later modules, the main design idea of the function module is the heuristic search method is used to study the computer system for the player and the game model, based on the multiple analysis, find out the most conducive to their own position to move later, until one party wins the game. The design of the game on the basis of the organic combination of various functional modules to run smooth, man-machine mode can play. So the man-machine some heuristic search algorithm is discussed in this paper is the content.

The design of the five-in-a-row game after system function test, version specified in the Eclipse and resolution of Android virtual device achieves the interactive friendly interface, function complete with two game modes, the outcome fast accurate judgment of the game.

Key Words :Android ;Java ;Five-in-a-row game ;heuristic search

目 录

摘 要 I

Abstract II

目 录 III

第一章 引 言 5

1.1 背景与意义 5

1.2 国内外相关研究现状 5

1.3 研究目标和主要工作 5

1.4 研究方法与技术路线 6

1.5 论文结构安排 6

第二章 相关技术基础 7

2.1 面向对象的分析与设计 7

2.2 Android编程环境介绍 7

2.2.1 JDK的配置 7

2.2.3安装 Android插件 7

2.2.4 AVD的创建 8

2.3 极大极小搜索算法简介 9

2.4 本章小结 9

第三章 系统需求分析与系统设计 10

3.1 用例图 10

3.1.1 五子棋游戏系统用例图 10

3.1.2 玩家方用例图 10

3.1.3 机器方用例图 11

3.2 数据需求分析 11

3.2.1数据字典 11

3.3性能需求分析 12

3.4总体设计 12

3.4.1系统类图 12

3.4.2系统概要设计的核心方面 13

3.5详细设计 13

3.5.1游戏界面布局的详细设计 13

3.5.2人机对战部分详细设计 14

3.5.3两种模式下胜负判定详细设计 18

3.5本章小结 19

第四章 系统的实现 20

4.1运行环境及工具介绍 20

4.2 游戏界面布局的具体实现 20

4.2.1棋盘和棋子的描述 20

4.3 人机对战部分的核心算法的开发与实现 21

4.3.1第一次分析 21

4.3.2第二次分析 23

4.3.3第三次分析 25

4.4 五子棋的胜负判定的实现 26

4.5本章小结 27

第五章 系统测试及运行 28

5.1 系统测试 28

5.1.1系统的测试环境 28

5.1.2系统的功能测试 28

5.2 系统运行(核心界面截图) 29

5.2.1人机对战演示 29

5.2.2双人对战演示 31

5.3本章小结 32

第六章 总结与展望 33

6.1设计总结 33

6.2展望 33

致 谢 34

参考文献 35

第一章 引 言

本论文是基于Android智能手机的五子棋游戏的设计与实现,五子棋是一种比较传统的棋类游戏,而近期随着大屏幕智能手机的快速发展,Android成为一种新兴的主流的移动终端操作系统。所以,安卓端的五子棋游戏是一种传统娱乐和新平台之间的结合。本次毕设的重点放在了其中相关算法的设计,以下简要介绍本课题的一些基本知识和内容框架。

1.1 背景与意义

五子棋是一款策略类益智游戏,其起源于中国的传统黑白棋。其风格朴实操作简单,老少皆宜,趣味横生还可提升智力,开发作为安装在移动设备上的游戏,其具有了无与伦比的方便性和跨地域性。

随着智能手机在社会生活中的快速普及,Android作为谷歌推出了开源的移动操作系统,以其具有的开放性开发体系架构和调试环境,同时还兼容多种用户体验,因而被越来越多的人群接受和喜欢。由此看来,开发安卓平台的手机游戏具有非常广阔的前景。

剩余内容已隐藏,请支付后下载全文,论文总字数:17853字

您需要先支付 80元 才能查看全部内容!立即支付

企业微信

Copyright © 2010-2022 毕业论文网 站点地图