Giter VIP home page Giter VIP logo

gobang's Introduction

五子棋游戏开发流程

一、游戏菜单

(1)、开始游戏

(2)、游戏设置

(3)、游戏说明

二、游戏面板

(1)、棋盘

(2)、玩家和电脑

(3)、记录下子个数

(4)、记录分数

(5)、判定胜负

(6)、头像

三、电脑AI算法

(1)、五元组遍历

(2)、计分表权重

​ 五子棋盘为15 x 15 的大小,横竖斜四个方向共有572个五元组,给每个五元组一个评分(或权重),这个五元组为它的每个位置贡献的分数就是这个五元组自身的得分,对整个棋盘来说,每个位置的得分就是该位置所在的横竖斜四个方向的所有五元组的得分之和,

然后从所有空位置中选出得分最高的位置就是机器落子的位置。

四、输赢算法

以当前落子位置为中心,只要横、竖、正斜、反斜任一方向有五颗同色棋子连成一线则判定获胜。

五、游戏截图

image

image

六、命令

使用 lessc 命令行工具来编译 Less 文件

npm install -g less

编译 Less 文件

lessc css/game.less css/game.css

如果你想将编译后的 CSS 输出为单行,可以使用 --clean-css 插件

使用 clean-css 插件

npm install -g less-plugin-clean-css

编译

lessc css/game.less css/game.css --clean-css

gobang's People

Contributors

mao888 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.