Coder Social home page Coder Social logo

stupidgo's Introduction

Stupid Go

我的计算机导论(22-23春)大作业。

一个围棋程序,实现了人人对战、自动提子、判定胜负等功能。

主要功能

  1. 落子后自动提去对方无气之子。
  2. 基于**规则数子法的半自动胜负判断:
    1. 需要在下完单官之后点击“确认终局”按钮
    2. 程序会自动提去一部分死子,接着需要手动点击去除死子(无论如何落子也无法形成双眼的棋子)
    3. 手动提死子时,可以一键提掉与相关死子,一般来说点击2-4次即可提取完成。
    4. 点击"提完了"按钮,自动数子计算胜负,包括赢多少子。
  3. 使用包干用时制规则的自动棋钟。

快速开始

  1. 准备 python 环境,3.10 是我使用的 python 版本,其他 python3 版本应该也可以运行。
  2. 将 main.py/GoCore.py/GoBoard.py 文件置于同一目录下,运行 main.py 即可。
  3. 黑白轮流落子。
  4. 在走完所有单官后,点击“确认终局”,按提示提掉死子,再点击“提完了”,会自动计算胜负,以及赢得子数

注意:按照**规则,需要在终局前把单官走完、终局后把死子提尽。也就是说,数子时,任意空交叉点组成的块都只与一种颜色的棋子相邻(都指在上下左右的意义上),否则报错。

详细规则

本程序使用的规则主体为**规则,计时棋钟使用包干用时制。

详见详细规则

具体实现

本程序对于规则的具体实现方法。

详见具体实现

stupidgo's People

Contributors

yy4382 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.