已采纳回答 / qq_克克的_0
完整代码地址:https://gitee.com/yanglilong127/ai_manmachine_war_chess 该游戏演示地址:https://yanglilong127.gitee.io/ai_manmachine_war_chess
2018-06-15
已采纳回答 / qq_牵手蓠祛_0
这代码两不多照着写。没问题的。/** * */var me = true;var chessBorad = [];var over = false;//赢法数组var wins = [];//赢法统计数组var myWin = [];var computerWin = [];for(var i = 0;i < 15;i++){ chessBorad[i] =[]; for(var j = 0;j < 15;j++){ chessBorad[i][j] =0; }}//赢法数组初始化for(...
2018-03-23
已采纳回答 / 幕布斯0246692
for(var i=0;i<15;i++){ myScore[i]=0; computerScore[i]=0; for(var j=0;j<15;j++){ myScore[i][j]=0; computerScore[i][j]=0; } }这块儿:myScore[i]=0;computerScore[i]=0;应该是:myScore[i]=[];computerScore[i]=[];初始化一个二维数组。
2018-02-16
已采纳回答 / scanf莺曲
已改好 建议多写 多练 var chessBoard = []; var me = true; var over = false; var count = 0;//赢法数组 var wins = [];//赢法的统计数组 var myWin = [];//统计我方的 var computerWin = [];//统计计算机的 for (var i = 0; i < 15; i++) { chessBoard[i] = []; ...
2017-06-14
已采纳回答 / 帅意
var chessBoard=[];var me=true;var over=false;//赢法数组var wins=[];//赢法统计数组var myWin=[];var computerWin=[];for(var i=0;i<15;i++){ chessBoard[i]=[]; for(var j=0;j<15;j++){ chessBoard[i][j]=0; }}for(var i=0;i<15;i++){ wins[i]=[]; for(var j=0;j<15;j...
2017-04-09
已采纳回答 / 吴智彬
你肯定是在哪步写错了,给你提供完整的参考代码吧!index.html<...code...>style.css<...code...>script.js<...code...>
2016-10-20
已采纳回答 / qq_沒妳了半城繁華半城傷_040834
var me = true;var chessBoard = [];var over = false;var wins = [];var myWin = [];var computerWin = [];for(var i=0; i<17; i++){ chessBoard[i] = []; for(var j=0; j<17; j++){ chessBoard[i][j] = 0; }}for(var i=0; i<17; i++){ wins[i] = []; for(var j=0...
2016-10-18