当前位置: 首页 > wzjs >正文

嘉兴网站建设品牌升级店铺网站域名怎么做

嘉兴网站建设品牌升级,店铺网站域名怎么做,wordpress 密码更改,用户体验差有哪些网站开篇引言​ 麻将作为一款风靡全球的策略性游戏,其复杂的规则和多变的牌局给玩家带来了无尽乐趣。在数字化时代,运用编程技术为麻将游戏赋予智能,实现自动出牌功能,不仅能提升玩家体验,还能深入探索算法在博弈游戏中的…

开篇引言​

麻将作为一款风靡全球的策略性游戏,其复杂的规则和多变的牌局给玩家带来了无尽乐趣。在数字化时代,运用编程技术为麻将游戏赋予智能,实现自动出牌功能,不仅能提升玩家体验,还能深入探索算法在博弈游戏中的应用。今天,就和大家分享我如何使用 Java 编写一个智能麻将出牌组件的过程。​

1. 麻将规则简述​

简单介绍麻将的基本规则,如牌型(顺子、刻子、对子等)、胡牌方式、不同花色牌的作用等。强调这些规则是后续智能出牌算法设计的基础。例如,因为有顺子和刻子的牌型,所以在计算出牌策略时,需要考虑如何通过出牌来促进这些牌型的形成或完善。​

11-19为1万-9万,21-29为1条到9条,31-39为1筒到9筒,41-47为东西南北中发白,51-58为梅兰竹菊春夏秋冬

2. 技术选型 - Java 的优势​

说明选择 Java 作为开发语言的原因。如 Java 强大的跨平台性,方便组件能在不同操作系统的麻将游戏中集成;丰富的类库,在处理牌的逻辑、数据结构和算法实现时能提供便捷工具;良好的面向对象特性,有利于构建清晰、可维护的代码结构等。​

3.主要的public方法

public class MahjongIntelligentModule {private Mahjong mahjong;private volatile static MahjongIntelligentModule singleton;/*** 智能模块控制方法** @param handCards     手牌* @param outCards      已出的牌* @param laiZiCards    癞子牌* @param handCard      本次需要出的牌* @param queYiMenValue 缺一门牌值* @param lastOutCard   上一次出的牌* @param noOutCardList 不能出的牌* @return 可以出的牌值*/public MahjongIntelligentModule(List<Integer> handCards, List<Integer> outCards, List<Integer> laiZiCards, int handCard, int queYiMenValue, int lastOutCard, List<Integer> noOutCardList) {……}/*** 通过智能算法获取可以出的牌值,判断出牌后听牌最大的可能性,通过outCards判断出这张牌是否还有可能胡的牌** @return 可以出的牌值*/public int getOutCard() {……}/*** 判断是否可以碰牌,通过牌型判断和outCards判断碰后是否会影响原来的牌型,加入影响则返回false,否则返回true** @return 是否可以碰牌*/public boolean getPengCard() {……}/*** 判断是否可以杠牌,通过牌型判断和outCards判断杠后是否会影响原来的牌型,加入影响则返回false,否则返回true** @return 是否可以杠牌*/public boolean getGangCard(Integer cardType) {……}}

4. 智能出牌概率计算

进张概率计算​; 拆对、刻、顺概率评估;综合出牌概率公式应用​

5. 测试与验证​

5.1 出牌测试

List<Integer> handCards = new ArrayList<>(Arrays.asList(12,13,14,15,16,17,24,26,32,33,35,37,38,26));MahjongIntelligentModule mahjongIntelligentModule = new MahjongIntelligentModule(handCards,new ArrayList<>(Arrays.asList()),new ArrayList<>(),-1,-1,-1,new ArrayList<>());int outcard = mahjongIntelligentModule.getOutCard();System.out.println("需要出的牌:"+outcard);


CardsInformationInfo{cardsInformations=……, outCard=24, maxChance=9.79}
需要出的牌:24 

 5.2 碰牌测试

List<Integer> handCards = new ArrayList<>(Arrays.asList(11,12,12,13,13,14,17));int lastoutcard = 12;MahjongIntelligentModule mahjongIntelligentModule = new MahjongIntelligentModule(handCards,new ArrayList<>(Arrays.asList()),new ArrayList<>(),-1,-1,lastoutcard,new ArrayList<>());boolean pengcard = mahjongIntelligentModule.getPengCard();System.out.println("碰的牌为:"+lastoutcard+"\t是否能碰:"+pengcard);

 碰的牌为:12    是否能碰:false

List<Integer> handCards = new ArrayList<>(Arrays.asList(11,12,12,12,13,17,17));int lastoutcard = 12;MahjongIntelligentModule mahjongIntelligentModule = new MahjongIntelligentModule(handCards,new ArrayList<>(Arrays.asList()),new ArrayList<>(),-1,-1,lastoutcard,new ArrayList<>());boolean pengcard = mahjongIntelligentModule.getPengCard();System.out.println("碰的牌为:"+lastoutcard+"\t是否能碰:"+pengcard);

 CardsInformationInfo{cardsInformations=……, outCard=17, maxChance=2.63}
出牌:17
碰的牌为:12    是否能碰:true

5.3吃牌测试

List<Integer> handCards = new ArrayList<>(Arrays.asList(11,12,12,12,13,17,17));int lastoutcard = 12;MahjongIntelligentModule mahjongIntelligentModule = new MahjongIntelligentModule(handCards,new ArrayList<>(Arrays.asList()),new ArrayList<>(),-1,-1,lastoutcard,new ArrayList<>());List<Integer> chiList = mahjongIntelligentModule.getChiCard();System.out.println("上加出的牌为:"+lastoutcard+"\t能吃的牌:"+chiList);

CardsInformationInfo{cardsInformations=……, outCard=17, maxChance=-0.15000000000000002}
出牌:17
上加出的牌为:12    能吃的牌:[11, 12, 13]

List<Integer> handCards = new ArrayList<>(Arrays.asList(12,13,14,15,16,17,18));int lastoutcard = 12;MahjongIntelligentModule mahjongIntelligentModule = new MahjongIntelligentModule(handCards,new ArrayList<>(Arrays.asList()),new ArrayList<>(),-1,-1,lastoutcard,new ArrayList<>());List<Integer> chiList = mahjongIntelligentModule.getChiCard();System.out.println("上家出的牌为:"+lastoutcard+"\t能吃的牌:"+chiList);

 上家出的牌为:12    能吃的牌:null


文章转载自:

http://l9nSWv5P.qzmnr.cn
http://oRV5bJXH.qzmnr.cn
http://fkLKmBI3.qzmnr.cn
http://sp3EXyVc.qzmnr.cn
http://Up1lLZzn.qzmnr.cn
http://wxkb6Qer.qzmnr.cn
http://xM9HLJcT.qzmnr.cn
http://L9ChBrhD.qzmnr.cn
http://3EsQDMbn.qzmnr.cn
http://v84ZRCkF.qzmnr.cn
http://BFBCGsf9.qzmnr.cn
http://j5q4yzi0.qzmnr.cn
http://zeoPihTC.qzmnr.cn
http://MVb1UhRM.qzmnr.cn
http://i24lNdDC.qzmnr.cn
http://mx54799S.qzmnr.cn
http://LuU65Yks.qzmnr.cn
http://J51UczJj.qzmnr.cn
http://sXsNVErN.qzmnr.cn
http://M0OC6llW.qzmnr.cn
http://Wa7rpCgE.qzmnr.cn
http://Yjj6bB1H.qzmnr.cn
http://QAMUWfIJ.qzmnr.cn
http://6d4aOAKU.qzmnr.cn
http://Zs9MZdN2.qzmnr.cn
http://LnnidxJP.qzmnr.cn
http://H93wW6jc.qzmnr.cn
http://MgIvReVl.qzmnr.cn
http://pOKMo0CO.qzmnr.cn
http://ttTCp8Gm.qzmnr.cn
http://www.dtcms.com/wzjs/653008.html

相关文章:

  • 教学平台网站建设合同网站脚本错误
  • 网站顶部伸缩广告中国服务外包公司排名
  • 大众点评如何做团购网站番禺制作网站设计
  • 厦门自主建站模板广州网站备案要审核多久
  • 十堰市住房和城乡建设厅官方网站吸引人的推广标题
  • 网站规划与设计一千字组织建设内容
  • 免费网站代码东莞市企业网站建设哪家好
  • 邓州市网站建设泰州网站开发公司
  • 提供深圳网站制作公司广东省住房和城乡建设厅官网查证
  • 哪家企业做网站好做网站需要哪些基本功能
  • 建设厅网站首页重庆承越网站建设地址
  • 自己做的网站网页错位wordpress文章页模板
  • 配件查询网站制作dz论坛网站建设
  • 网站html地图制作顺义青岛网站建设
  • 蛋糕店网站开发策划书站长工具的网址
  • 网站建设教程自学网百度首页关键词优化
  • 哪个做网站的公司好title 门户网站建设招标书
  • 中国建设银行山西省分行网站WordPress整站下载器
  • 如何给网站引流wordpress阅读数总是0
  • 厦门广告公司网站建设东莞专业做网站优化
  • 做红酒闪购的网站有哪些室内设计效果图线稿
  • 通州网站制作电子商务网站的功能
  • 陵水网站建设咨询网站效果图怎么做的
  • 有没有做会计的网站懒人图库网站源码
  • xxx网站建设策划书范文东莞定制网站建设
  • 虚拟网站新的购物网站怎么做流量分析
  • 长沙广告公司排行榜安卓优化大师旧版本下载
  • 网页设计制作一个网站网站建设计入什么会计科目
  • 潍坊门户网站建设wordpress建站教程linux
  • 自己动手的网站域名买卖网站