登录

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

注册

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

找回密码

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

基于Java的六子棋游戏设计与实现毕业论文

 2020-04-21 05:04  

摘 要

随着生活水平不断提高,人们不再仅仅满足于物质生活,闲暇时光人们会选择自己喜欢的娱乐活动用做消遣。棋类运动是人们比较热衷的娱乐,不仅能增强人的思维能力,提高智力,而且富含哲理,有助于修身养性。市面上已出现的棋类游戏种类繁多。然而围棋象棋门槛过高,耗时久,并不为所有年龄段的人所喜爱,而五子棋已被科学手段证明先行者拥有更高的获胜机会,并不是完全公平。因此,以java语言为基础,开发了这款单机版的六子棋游戏软件。

六子棋起源于罗马帝国,本名“风车棋”,因其太过古老,如今知道它的人少之又少。让这一棋种再次进入人们的视线也是本课题的目的和意义之一。作为“年龄”远超围棋和象棋的棋种,如今只能在博物馆和少数地方看到实在是太遗憾了,希望通过本课题能让这种冷门的娱乐方式受到关注。

本应用基于Java平台,主要实现了游戏整体部分,单机ai,游戏规则,悔棋,和重新开始游戏等功能。基本包含了市面上大部分棋类游戏应有的功能,可以满足玩家的基本需求,并且加入了简易电脑ai。

开发本应用的操作平台为windows 10,开发过程中使用eclipse for windows作为开发工具,用到了Java自带的Jframe GUI框架,这是一种集成式开发环境。

关键词:eclipse平台 六子棋 Jframe 游戏ai

Sixth chess game development based on Java

Abstract

With the continuous improvement of living standards, people are no longer satisfied with material life, leisure time people will choose their favorite recreational activities for recreation in leisure time. Chess game is a kind of entertainment that people are keen on. It can not only enhance people's thinking ability and intelligence, but also is rich in philosophy, which is conducive to self-cultivation. There are many kinds of board games on the market. But the stakes are high, the games take a long time and are not popular with people of all ages, and gogots have been scientifically proven to give the pioneers a higher chance of winning, which is not entirely fair. Therefore, based on the Java language, developed this version of the stand-alone version of the six pieces of chess game software.

Six pieces of chess originated in the Roman empire, the original name "windmill chess", because it is so old, now know it very few people. It is also one of the purposes and significance of this subject to make this kind of chess come into people's eyes again. As a kind of chess that is much older than go and chess, it is a pity that it can only be seen in museums and a few places now. I hope this topic can bring this unpopular entertainment into focus.

This application is based on the Java platform, mainly to achieve the overall part of the game, single machine ai, game rules, contrition, and restart the game and other functions. It basically contains the functions of most board games in the market and can meet the basic needs of players.

The operating platform for developing this application is Windows 10. In the development process, eclipse for Windows is used as the development tool, and the Jframe GUI framework of Java is used. This is an integrated development environment.

Key words: eclipse six chess Jframe game-ai

目录

摘要 I

Abstract II

第一章 引言 1

1.1 课题背景 1

1.2课题内容及意义 1

1.3论文的组织结构 1

第二章 相关技术介绍 3

2.1 Jframe框架介绍 3

2.2 游戏AI介绍 3

2.3 鼠标监听技术 4

2.4 棋类AI算法 4

第三章 基于Java的六子棋游戏应用的详细设计 7

3.1需求分析 7

3.1.1使用特点分析 7

3.1.2 功能需求分析 7

3.1.3游戏流程和规则介绍 7

3.1.4 用例图 8

3.2功能结构设计 8

3.2.1整体结构图 8

3.2.2各模块介绍 9

3.3 全局变量设计 10

3.4类设计 10

3.4.1实体类设计 10

3.4.2方法类设计 10

第四章 基于Java的六子棋游戏应用的实现与测试 12

4.1系统开发环境 12

4.2系统的实现 12

4.2.1界面的布局 12

4.2.2监听鼠标 14

4.2.3游戏流程功能的实现 15

4.2.4游戏AI的实现 19

4.2.5 游戏系统功能的实现 21

4.3系统功能测试 23

4.3.1测试方案及目的 23

4.3.2测试用例及结果 23

第五章 总结与展望 25

5.1 总结 25

5.2 展望 26

参考文献 27

致谢 29

第一章 引言

1.1 课题背景

在现在这个信息化时代,人们都在追求快速并且高质量的生活,在工作和生活的闲暇时间,游戏成为了人们放松的主要途径。无论在PC端还是手机端,棋类游戏都有繁多的种类:象棋,军旗,围棋,五子棋等。但象棋和围棋因为其规则复杂,门槛高,耗时久一直被人所诟病。而军旗,五子棋也有很多让先行者占据优势的套路,并不能做到完全公平。在一切都是快节奏的今天,能否有一种简单老少皆宜,流程较短并且基本公平的棋类游戏作为人们在闲暇时间的娱乐方式呢?

2016年3月份,发生了举世瞩目的大事件,一下子就改变了棋类游戏领域和人工智能行业的发展动态,谷歌开发的AI系统AlphaGo挑战了韩国围棋大师李世石。双方共进行了五局比赛,每一局的时长都超过3个小时,最终李世石以4比1败于AlphaGo。从结果来看,人类是输给了AI,这展现出人工智能的强大,以及其不会因为时间过长而出现疏漏的机器特性,和它缜密的逻辑算法。但是从李世石获得胜利的那一局可以看出:游戏AI并不是无敌的,或者说AI还有更大的进步空间。

1.2课题内容及意义

相关图片展示:

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

企业微信

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