Giter Site home page Giter Site logo

ssttkkl / mahjong-utils Goto Github PK

View Code? Open in Web Editor NEW
19.0 19.0 2.0 3.21 MB

Riichi Mahjong Pairi Algorithm Library (Kotlin Multiplatform)

Home Page: https://mahjong-utils-docs.vercel.app/

License: MIT License

Kotlin 99.90% Dockerfile 0.10%
java javascript kotlin kotlin-multiplatform mahjong mahjong-algorithm python riichi-mahjong typescript

mahjong-utils's Introduction

ssttkkl's Profile

ssttkkl's GitHub stats

ssttkkl's Productive time

ssttkkl's Top Langs by Commit

ssttkkl's Top Langs by Repo

点击请我打两把maimai

mahjong-utils's People

Contributors

mobyw avatar ssttkkl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

neerdge

mahjong-utils's Issues

向听数计算bug report

依赖:

io.github.ssttkkl
mahjong-utils-jvm
0.6.5

调用:
List tiles = Tile.Companion.parseTiles("1z1z1z2z2z2z3z3z3z4z4z4z4z"); // 13张牌
ShantenResult rs = ShantenKt.shanten(tiles);
System.out.println(rs.getShantenInfo().getShantenNum());

输出结果为0(听牌),但正确结果应该为1(一向听)
如果输入为"1z1z1z2z2z2z3z3z3z3z4z4z4z4z"(14张牌),输出结果也是0,但正确结果应该为1

TypeError: <class 'mahjong_utils.shanten.models.CommonShantenResult'> is not a generic class

Error when trying to import mahjong_utils:

Traceback (most recent call last):
  File "T:\get_reward\get_reward.py", line 4, in <module>
    import mahjong_utils
  File "T:\get_reward\VENV\lib\site-packages\mahjong_utils\__init__.py", line 1, in <module>
    from . import hora
  File "T:\get_reward\VENV\lib\site-packages\mahjong_utils\hora\__init__.py", line 1, in <module>
    from .hora import *
  File "T:\get_reward\VENV\lib\site-packages\mahjong_utils\hora\hora.py", line 10, in <module>
    from mahjong_utils.shanten import ShantenResult
  File "T:\get_reward\VENV\lib\site-packages\mahjong_utils\shanten\__init__.py", line 1, in <module>
    from .models import *
  File "T:\get_reward\VENV\lib\site-packages\mahjong_utils\shanten\models.py", line 262, in <module>
    class RegularShantenResult(CommonShantenResult[RegularHandPattern]):
  File "T:\get_reward\VENV\lib\site-packages\pydantic\main.py", line 591, in __class_getitem__
    raise TypeError(f'{cls} is not a generic class')
TypeError: <class 'mahjong_utils.shanten.models.CommonShantenResult'> is not a generic class

Tested under windows 11, Python 3.10.6 and Python 3.11.4

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.