tictactoe:免费代码营高级项目-井字游戏

时间:2021-05-02 00:11:12
【文件属性】:
文件名称:tictactoe:免费代码营高级项目-井字游戏
文件大小:368KB
文件格式:ZIP
更新时间:2021-05-02 00:11:12
JavaScript 井字游戏 免费Code Camp高级项目。 这是我遇到的最长,最困难的项目,因为它试图为无与伦比的AI构建算法,而了解minimax算法则是一个漫长而痛苦的过程。 该项目完全是用ES6编写的。 参见下面的代码,了解minimax算法。 const minimax = (newBoard, player) => { const availSpots = emptySquares(newBoard); if (checkWin(newBoard, humanPlayer)) { return {score: -10}; } else if (checkWin(newBoard, aiPlayer)) { return {score: 10}; } else if (availSpot
【文件预览】:
tictactoe-master
----css()
--------tictactoe.css(2KB)
----README.md(2KB)
----img()
--------minimax2.png(236KB)
--------minimax.png(143KB)
--------preview.JPG(38KB)
----js()
--------tictactoe.js(6KB)
----index.html(3KB)

网友评论