Code Monkey home page Code Monkey logo

mjhucheck's Introduction

mjHuCheck

add mjhuCheck

麻将牌的值 参考 mjHelper.js 
	var cardList = this.CFG.MJ_CARDS;
    var cardType = 0;
    for(;cardType<3;cardType++)
    {

        for(var j=1;j<10;j++)
        {
            var card =  cardType<<4 | j;
            cardList.push(card)
        }

    }


    for(var j=1;j<5;j++)
    {
        var card =  cardType<<4 | (j*2-1);
        cardList.push(card)
    }

    cardType++;

    for(var j=1;j<4;j++)
    {
        var card =  cardType<<4 | (j*2-1);
        cardList.push(card)
    }

    this.MJ_ALL_CARDS = [];
    for(var i=0;i<cardList.length;i++)
    {
        for(var j=0;j<4;j++)
        {
            this.MJ_ALL_CARDS.push(cardList[i]);
        }
    }

Client.testAy 传入一个数组 数组必须是 有序的 用以检测是否胡牌

不能检测 十三幺 七对 七星不靠 这类的特殊胡法

mjhucheck's People

Contributors

gjh1987 avatar

Stargazers

 avatar  avatar  avatar tdjdyq avatar  avatar  avatar

Watchers

James Cloos avatar tdjdyq avatar  avatar  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.