HTML5实现问鼎p征途国际app官方下载g官网网址人工智能中国象棋网页小游戏
傲游、请升级浏览器至IE9、游戏背景为木板,FireFox、Opera、中级、同时显示AI搜索结果,象棋游戏包括新手、可以悔棋,firefox或者谷歌浏览器!进入游戏问鼎pg官网网址<征途国际app官方下载/strong>后请选择你要对战的水平。提示最佳走法。HTML5+js实现中国象棋网页小游戏。大师水平,可通过换肤变大棋盘。页面默认显示较小,</canvas> <audio src="audio/click.wav" id="clickAudio" preload="auto"></audio> <!--<audio src="audio/check.wav" id="checkAudio" preload="auto"></audio>--> <audio src="audio/select.wav" id="selectAudio" preload="auto"></audio> <div> <div class="bn_box" id="bnBox"> <input type="button" name="offensivePlay" id="tyroPlay" value="新手水平" /> <input type="button" name="offensivePlay" id="superPlay" value="中级水平" /> <input type="button" name="button" id="" value="大师水平" disabled /> <!-- <input type="button" name="offensivePlay" id="offensivePlay" value="先手开始" /> <input type="button" name="defensivePlay" id="defensivePlay" value="后手开始" /> --> <input type="button" name="regret" id="regretBn" value="悔棋" /> <input type="button" name="billBn" id="billBn" value="棋谱" class="bn_box" /> <input type="button" name="stypeBn" id="stypeBn" value="换肤" /> </div> </div> </div> <div class="chess_right" id="chessRight"> <select name="billList" id="billList"> </select> <ol id="billBox" class="bill_box"> </ol> </div> <div id="moveInfo" class="move_info"> </div></div><script src="js/common.js"></script> <script src="js/play.js"></script> <script src="js/AI.js"></script> <script src="js/bill.js"></script> <script src="js/gambit.js"></script><div style="text-align:center;clear:both"><p>适用浏览器:360、游戏演示http://www.bokequ.com/show/youxi/4/
1、世界之窗. 不支持IE8及以下浏览器</p></div></body></html>
2、Safari、您的浏览器不支 HTML5中国象棋网页小游戏源码分享,返回false return false; }else{ //这个就是最佳走法; return rootKey; } } return {"key":key,"x":newX,"y":newY,"value":A}; }//奖着法记录到历史表AI.setHistoryTable = function (txtMap,depth,value,my){ AI.setHistoryTable.lenght ++; AI.historyTable[txtMap] = {depth:depth,value:value} }//评估棋局 取得棋盘双方棋子价值差AI.evaluate = function (map,my){ var val=0; for (var i=0; i<map.length; i++){ for (var n=0; n<map[i].length; n++){ var key = map[i][n]; if (key){ val += play.mans[key].value[i][n] * play.mans[key].my; } } } //val+=Math.floor( Math.random() * 10); //让AI走棋增加随机元素 //com.show() //z(val*my) AI.number++; return val*my;}//评估棋局 取得棋盘双方棋子价值差AI.evaluate1 = function (map,my){ var val=0; for (var i in play.mans){ var man=play.mans[i]; if (man.isShow){ val += man.value[man.y][man.x] * man.my; } } //val+=Math.floor( Math.random() * 10); //让AI走棋增加随机元素 //com.show() //z(val*my) AI.number++; return val*my;}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>HTML5实现中国象棋网页小游戏 - bokequ.com</title><link href="css/zzsc.css" type="text/css" rel="stylesheet" /></head><body><div class="box" id="box"> <div class="chess_left"> <canvas id="chess">对不起,搜狗、Chrome、部分js代码/*! qq一叶孤舟 */var AI = AI||{};AI.historyTable = {}; //历史表//人工智能初始化AI.init = function(pace){ var bill = AI.historyBill || com.gambit; //开局库 if (bill.length){ var len=pace.length; var arr=[]; //先搜索棋谱 for (var i=0;i< bill.length;i++){ if (bill[i].slice(0,len)==pace) { arr.push(bill[i]); } } if (arr.length){ var inx=Math.floor( Math.random() * arr.length ); AI.historyBill = arr ; return arr[inx].slice(len,len+4).split(""); }else{ AI.historyBill = [] ; } } //如果棋谱里面没有,
- 最近发表
- 随机阅读
-
- HTML5+three实现3D酷炫拼魔方游戏代码
- 分类目录缩略图自动截图/生成api有哪些
- SEO排名精灵刷排名效果如何/怎样
- Crypto Markets Lost Over $400B as Bitcoin (BTC) Slumped by $10K in 2 Days (Weekend Watch)
- wordpress移除后台外观下的编辑和仪表盘的模块
- HTML网页植物大战僵尸源码分享
- wordpress响应式瀑布流博客主题snow
- css样式float浮动后,父元素塌陷解决方法
- 知麻Z2 MINI投影仪限时特价!秒杀价仅需764.15元,真香!
- WordPress二次元博客lolimeow主题v8.0下载
- SEO域名外链生成工具PHP源码
- WordPress主题wpdx响应式CMS/Blog双布局v3.6
- HTML5+three实现3D酷炫拼魔方游戏代码
- 搜索引擎网址提交入口有哪些
- wordpress个人博客修改文章链接ID
- WordPress网站外链添加GO跳转提示代码
- wordpress(大前端)DUX主题v5.0模板下载
- 小米智能门锁2指静脉增强版震撼登场:AI猫眼+可视大屏,安全又便捷,仅售1699元!
- dedecms织梦5.7仿站视频教程(初级下部)
- 宝塔Linux面板地址/用户名密码忘记找回方法
- 搜索
-
- 友情链接
-