示例#1
0
 public CheckTsuiisou(Yaku owner)
 {
     this.YakuID = 35;
     hantei      = owner.checkTsuisou();
     hanSuu      = 8;
     yakuman     = true;
 }
示例#2
0
 public CheckTenhou(Yaku owner)
 {
     this.YakuID = 26;
     hantei      = owner.checkTenhou();
     hanSuu      = 24;
     yakuman     = true;
 }
示例#3
0
 public CheckKokushiMusou(Yaku owner)
 {
     this.YakuID = 37;
     hantei      = owner.checkKokushi() && !owner.checkKokushi_13Men();
     hanSuu      = 13;
     yakuman     = true;
 }
示例#4
0
 public CheckSuukantsu(Yaku owner)
 {
     this.YakuID = 32;
     hantei      = owner.checkSuukantsu();
     hanSuu      = 13;
     yakuman     = true;
 }
示例#5
0
 public CheckRyuiisou(Yaku owner)
 {
     this.YakuID = 31;
     hantei      = owner.checkRyuuisou();
     hanSuu      = 13;
     yakuman     = true;
 }
示例#6
0
 public CheckChinroutou(Yaku owner)
 {
     this.YakuID = 30;
     hantei      = owner.checkChinroutou();
     hanSuu      = 13;
     yakuman     = true;
 }
示例#7
0
 public CheckSuuankou(Yaku owner)
 {
     this.YakuID = 29;
     hantei      = owner.checkSuuankou() && !owner.checkSuuankou_Tanki();
     hanSuu      = 13;
     yakuman     = true;
 }
示例#8
0
 public CheckChihou(Yaku owner)
 {
     this.YakuID = 27;
     hantei      = owner.checkTihou();
     hanSuu      = 13;
     yakuman     = true;
 }
示例#9
0
 public CheckRenhou(Yaku owner)
 {
     this.YakuID = 28;
     hantei      = owner.checkRenhou();
     hanSuu      = 13;
     yakuman     = true;
 }
示例#10
0
 public CheckTsuiisou_Chiitoitsu(Yaku owner)
 {
     this.YakuID = 35;
     hantei      = owner.checkTsuisou_Chiitoitsu();
     hanSuu      = 13;
     yakuman     = true;
 }
示例#11
0
 public CheckShousuushii(Yaku owner)
 {
     this.YakuID = 34;
     hantei      = owner.checkSyousuushi();
     hanSuu      = 13;
     yakuman     = true;
 }
示例#12
0
 public CheckDaisangen(Yaku owner)
 {
     this.YakuID = 33;
     hantei      = owner.checkDaisangen();
     hanSuu      = 13;
     yakuman     = true;
 }
示例#13
0
 public CheckChuurenpoutou(Yaku owner)
 {
     this.YakuID = 36;
     hantei      = owner.checkCyuurennpoutou() && !owner.checkCyuurennpoutou_Jyunsei();
     hanSuu      = 13;
     yakuman     = true;
 }
示例#14
0
 public CheckDaisuushii(Yaku owner)
 {
     this.YakuID   = 38;
     hantei        = owner.checkDaisuushi();
     hanSuu        = 13;
     yakuman       = true;
     doubleYakuman = true;
 }
示例#15
0
 public CheckSuuankou_Tanki(Yaku owner)
 {
     this.YakuID   = 39;
     hantei        = owner.checkSuuankou_Tanki();
     hanSuu        = 13;
     yakuman       = true;
     doubleYakuman = true;
 }
示例#16
0
 public CheckChuurenpoutou_Jyunsei(Yaku owner)
 {
     this.YakuID   = 40;
     hantei        = owner.checkCyuurennpoutou_Jyunsei();
     hanSuu        = 13;
     yakuman       = true;
     doubleYakuman = true;
 }
示例#17
0
 public CheckKokushiMusou_13Men(Yaku owner)
 {
     this.YakuID   = 41;
     hantei        = owner.checkKokushi_13Men();
     hanSuu        = 13;
     yakuman       = true;
     doubleYakuman = true;
 }
示例#18
0
 public PaymentInformation(int fu, int score, int[] scoreChanges, Yaku yaku)
 {
     Fu               = fu;
     Score            = score;
     _scoreChanges[0] = scoreChanges[0];
     _scoreChanges[1] = scoreChanges[1];
     _scoreChanges[2] = scoreChanges[2];
     _scoreChanges[3] = scoreChanges[3];
     Yaku             = yaku;
 }
示例#19
0
        public CheckChinitsu(Yaku owner)
        {
            this.YakuID = 25;
            hantei      = owner.checkTinisou();

            //if( owner.isNaki == true ) {
            hanSuu = 8;
            //}
            //else {
            //    hanSuu = 6;
            //}
        }
示例#20
0
        public CheckHonitsu(Yaku owner)
        {
            this.YakuID = 23;
            hantei      = owner.checkHonisou() && !owner.checkTinisou();

            //if( owner.isNaki == true ) {
            hanSuu = 4;
            //}
            //else {
            //    hanSuu = 3;
            //}
        }
示例#21
0
        public CheckChanta(Yaku owner)
        {
            this.YakuID = 13;
            hantei      = owner.checkCyanta() && !owner.checkJyunCyan() && !owner.checkHonroutou();

            if (owner.isNaki == true)
            {
                hanSuu = 1;
            }
            else
            {
                hanSuu = 2;
            }
        }
示例#22
0
        public static int Calculate(Yaku yaku)
        {
            if ((yaku & YakumanFilter) != Yaku.None)
            {
                var yakumanBits = (int)Popcnt.X64.PopCount((ulong)yaku);
                return(yakumanBits + 128);
            }

            var setBits1 = (int)Popcnt.X64.PopCount((ulong)(yaku & HanMask1));
            var setBits2 = (int)Popcnt.X64.PopCount((ulong)(yaku & HanMask2));
            var setBits4 = (int)Popcnt.X64.PopCount((ulong)(yaku & HanMask4));

            return(setBits1 + 2 * setBits2 + 4 * setBits4);
        }
示例#23
0
        public CheckIkkituukan(Yaku owner)
        {
            this.YakuID = 14;
            hantei      = owner.checkIkkituukan();

            if (owner.isNaki == true)
            {
                hanSuu = 1;
            }
            else
            {
                hanSuu = 2;
            }
        }
示例#24
0
        public CheckSansyokuDouJun(Yaku owner)
        {
            this.YakuID = 15;
            hantei      = owner.checkSansyokuDoujun();

            if (owner.isNaki == true)
            {
                hanSuu = 1;
            }
            else
            {
                hanSuu = 2;
            }
        }
示例#25
0
        public CheckHonitsu(Yaku owner)
        {
            this.YakuID = 23;
            hantei      = owner.checkHonisou() && !owner.checkTinisou();

            if (owner.isNaki == true)
            {
                hanSuu = 2;
            }
            else
            {
                hanSuu = 3;
            }
        }
示例#26
0
        public CheckJyunChan(Yaku owner)
        {
            this.YakuID = 24;
            hantei      = owner.checkJyunCyan();

            if (owner.isNaki == true)
            {
                hanSuu = 2;
            }
            else
            {
                hanSuu = 3;
            }
        }
示例#27
0
        public CheckChinitsu(Yaku owner)
        {
            this.YakuID = 25;
            hantei      = owner.checkTinisou();

            if (owner.isNaki == true)
            {
                hanSuu = 5;
            }
            else
            {
                hanSuu = 6;
            }
        }
示例#28
0
        static void Main(string[] args)
        {
            Console.WriteLine("Entered here");


            Other other = new Other();
            Yaku  yaku  = new Yaku();

            Hand hand = new Hand();

            hand = other.generateThirteenOrphansHand();

            Hand pairsHand = other.generateAllPairHand();

            string outcome = yaku.YakuCheck(pairsHand);

            Console.WriteLine("Output is: " + outcome);
        }
示例#29
0
        public static Card GetYakuCard(Yaku card)
        {
            switch (card)
            {
            case Yaku.Krum:
                return(new CreatureCard(new CardEnum(card), "Krum", 7, 9, new KrumAttack(1), creatureEffect: new GainCPForCardPlayedEffect(), isLegendary: true));

            case Yaku.BlackSeaNettle:
                return(new CreatureCard(new CardEnum(card), "Black Sea Nettle", 1, 1, new GainCPAttack(1, 1, 1), ability: new GainCPAbility(1, 0, 2)));

            case Yaku.RoyalStarfish:
                return(new CreatureCard(new CardEnum(card), "Royal Starfish", 2, 2, new SimpleAttack(1, 2), ability: new GiveEPAbility(1, 1, 1)));

            case Yaku.BigClawSnappingShrimp:
                return(new CreatureCard(new CardEnum(card), "Big-Claw Snapping Shrimp", 3, 3, new SimpleAttack(1, 2), ability: new DamageDependingOnCPAbility(2, 1)));

            case Yaku.MuggerCrocodile:
                return(new CreatureCard(new CardEnum(card), "Mugger Crocodile", 5, 5, new DrawCardAndAttack(1, 4), shield: Shield.SHIELDMAIDEN));

            case Yaku.ReaperKraken:
                return(new CreatureCard(new CardEnum(card), "Reaper Kraken", 5, 4, new SimpleAttack(1, 3), ability: new DrawCardAbility(2, 1, 0), shield: Shield.SHIELDMAIDEN));

            case Yaku.KillerWhale:
                return(new CreatureCard(new CardEnum(card), "Giant Whale", 6, 8, new SimpleAttack(2, 5), ability: new ReturnToHandAbility(2, 1), shield: Shield.BOTH));

            case Yaku.EnergyMaker:
                return(new SpellCard(new CardEnum(card), "Energy Maker", 2, new AddEPAndDrawSpellAbility()));

            case Yaku.WavesPower:
                return(new SpellCard(new CardEnum(card), "Waves Power", 2, new GainCpSpellAbility()));

            case Yaku.Rainstorm:
                return(new SpellCard(new CardEnum(card), "Rainstorm", 4, new DealTotDamageToTotTargetsSpellAbility()));

            default:
                throw new NotImplementedException();
            }
        }
示例#30
0
        public CheckLenFonHai(Yaku owner)
        {
            this.YakuID = 42;

            EKaze jikaze = owner.AgariParam.getJikaze();
            EKaze bakaze = owner.AgariParam.getBakaze();

            if (jikaze == EKaze.Ton && bakaze == EKaze.Ton)
            {
                if (owner.checkTon())
                {
                    hantei = true;
                    hanSuu = 2;
                }
            }
            else if (jikaze == EKaze.Nan && bakaze == EKaze.Nan)
            {
                if (owner.checkNan())
                {
                    hantei = true;
                    hanSuu = 2;
                }
            }
        }
示例#31
0
    /**
     * リールを止めるべき所に止める。
     * @param stopNum 第?回胴停止(左=0, 中=1, 右=2)
     * @return 既に止まっていたら true
     */
    private bool setReelStopAngle(int stopNum, Yaku y, MeoshiType mt)
    {
        if (IsReelStopped(stopNum))
        {
            return true; // 止まってる
        }

        // 止まる場所
        int result_index;

        // 目押サポート付ボーナスイン
        result_index = ANGLE2INDEX(int_s_value[Defines.DEF_INT_REEL_ANGLE_R0 + stopNum]);

        result_index = EyeSniper(stopNum);

        // 停止角度を決める
        int_s_value[Defines.DEF_INT_REEL_STOP_R0 + stopNum] = INDEX2ANGLE(result_index);

        // 停止出目を覚えておく
        int_s_value[Defines.DEF_INT_PREV_GAME] &= ~(0x1F << stopNum * 5);   // 対象BITをクリア
        int_s_value[Defines.DEF_INT_PREV_GAME] |= (result_index << (stopNum * 5));  // 記憶

        if (mobile.isJacCut() == true)
        {
            return true;
        }

        return false;
    }
示例#32
0
        public Associative Collect(Associative param)
        {
            var reelstopleft = null as string;
            var reelstopcenter = null as string;
            var reelstopright = null as string;
            var oshijun = null as string;

            var left = 0;   // ボタン0押下時リール位置
            var center = 0; // ボタン1押下時リール位置
            var right = 0;  // ボタン2押下時リール位置
            var order = null as int[]; // 押し順

            try
            {
                reelstopleft = param["reelStopLeft"];
                reelstopcenter = param["reelStopCenter"];
                reelstopright = param["reelStopRight"];
                oshijun = param["oshijun"];

                left = reelstopleft.ParseInt();
                center = reelstopcenter.ParseInt();
                right = reelstopright.ParseInt();
                order = oshijun.ToCharArray().Select(c => c.ToString().ParseInt()-1).ToArray();
            }
            catch
            {
                return new Associative() { { "result", "error".DQ() } };
            }

            var winCoins = 0;
            var gotCoinCountFlg = false;

            // マシンからのコールバック群

            Action<int> Payout = (coinCount) =>
            {
                winCoins = coinCount;
                gotCoinCountFlg = true;
            };

            Action<int> ReelStart = (_yaku) =>
            {
            };

            Action<int, int> ButtonStop = (button, reelIndex) =>
            {
            };

            Action<int> KeyTrigger = (key) =>
            {
            };

            Action Bet = () =>
            {
            };

            var callbacks = new CallbackToController()
            {
                Payout = Payout,
                ReelStart = ReelStart,
                ButtonStop = ButtonStop,
                KeyTrigger = KeyTrigger,
                Bet = Bet
            };

            var indexis = new int[] { left, center, right };

            mobile.SetClientPressed(indexis);

            // 押し順、押した位置で止める
            while(gotCoinCountFlg == false)
            {
                mobile.ZZ.int_value[Defines.DEF_Z_INT_KEYPRESS] |= (1 << 5);
                mobile.exec(callbacks);
                Thread.Sleep(20);
            }

            var v1 = reelstopleft.Substring(1, (reelstopleft.Length - 1));
            var v2 = reelstopcenter.Substring(1, (reelstopcenter.Length - 1));
            var v3 = reelstopright.Substring(1, (reelstopright.Length - 1));
            var v4 = oshijun.Substring(1, (oshijun.Length - 1));
            var xor = v1 + v2 + v3 + v4;
            var code = (xor.ParseLong()^(0xffeeddcc)).ToString();
            var yaku = code.Substring(4, 2).ParseInt();
            var payout = code.Substring(6, 2).ParseInt();

            var result = new Associative();
            result.Add("result", "WIN".DQ());
            result.Add("payout", payout.ToString());
            result.Add("yaku", ((int)yaku).ToString());

            State = MACHINE_STATE.COLLECT;

            Logger.Info($"[INFO]Collect GameId:{gameId} UserId:{userId} Payout:{winCoins} Yaku:{yaku}");

            // 役を保存しておく
            currentYaku = (Yaku)yaku;

            return result;
        }
示例#33
0
 public YakuN(Yaku yaku, int n)
 {
     this.yaku = yaku;
     this.n = n;
 }