Coder Social home page Coder Social logo

cmd_mahjong's People

Contributors

pulcherriman avatar fvh-p avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar

Forkers

fvh-p

cmd_mahjong's Issues

平和の判定を簡単にやる方法

以下の2つを簡単に判定できるアルゴリズムが欲しい。とくに後者。

  • アタマが役牌じゃないこと
  • 待ちが両面であったこと

リーチのみやツモのみが役なしになる

それはそう。

こいつが、

if %hand_sum% equ 0 (
echo 役なし!
popd && exit /b 0
)

これより上にあるのが悪い。

if %riichi% equ 1 (
if %oneshot% neq 0 (
set /a han+=2
echo リーチ
echo 一発
) else (
set /a han+=1
echo リーチ
)
)
if %riichi% equ 2 (
if %oneshot% neq 0 (
set /a han+=3
echo ダブリー
echo 一発
) else (
set /a han+=2
echo ダブリー
)
)
if %haitei% neq 0 (
set /a han+=1
if %self_pick% neq 0 (
echo 海底摸月
) else (
echo 河底撈魚
)
)
if %rinshan% neq 0 (
set /a han+=1
echo 嶺上開花
)
if %chankan% neq 0 (
set /a han+=1
echo 搶槓
)
if %self_pick% neq 0 if %open_group_cnt% equ 0 (
set /a han+=1
echo ツモ
)

メモ

七対子 (特殊形なのでタンヤオ、清一色、混一色との複合がない場合 %hand_sum%0 ) の表示をつくるときには混一色の下にくるようにコードが配置される予定なので役なしの分岐はそのさらに下に置くべき。

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.