Git Product home page Git Product logo

gomoku's Introduction

gomoku

五子棋联机版

实现一个五子棋的游戏,可以联机对战,也可以单机与AI对战

如何使用

git clone https://github.com/SSnewbie/gomoku.git
npm install
npm run bulid
npm run server

// 单机版不需要安装,打开server目录下的public运行index.html可以运行单机模式和自由模式

在线版

技术

  • webpack + express+ socket.io + es6

截图

(图片都是自己ps做的,我大概是个假前端吧)....

TODO

基本功能

  • 棋盘
  • 可以轮换落子
  • 胜负判断
  • 联机

AI

  • 实现A I

游戏模式(到时候想个酷炫的名字)

前提:A:白棋,B:黑棋

  • 1-普通模式

  • 2-视野盲区

    • A只能看到(白棋)B只能看到(黑棋)
    • 对方下的棋只能显示2S
    • 虽然看不到对方下的棋,但是已落子的地方不能落子,以下所有游戏模式都遵守这个规则
  • 3-互换视野

    • A只能看到B下的棋(黑棋)B只能看到A下的棋(白棋)
  • 视野暂留A(附加1、2、3)

    • 落子后3S内显示可以看到的视野
    • 落子以后3S后,失去所有视野(只是看不到,实际存在)
  • 记忆大师

    • 落子3S后,落下的子在棋盘上消失,(只是看不到,实际存在)

吐槽:

本计划用gulp+ts,然后配置环境10min后我放弃了,gulp好久没用配置起来十分生疏。一大堆细节和依赖配置很蛋疼。

然后我直接删目录换webpack+ts,然后配置了半小时。基本可以运行。然后设计目录准备下手时简直懵逼了,(ts没好好学,就是写angular时看了看,不是很熟练,下手时感觉很尴尬,虽然用的是.ts 最后还是写的js风格的代码(雾

......所以我最后选择了不用ts(MDZZ

然后我又删了目录,1个小时过去了

gomoku's People

Contributors

ssloth avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

andy521

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.