Esempio n. 1
0
        public void 手配大明槓テスト()
        {
            Tehai testTehai = new Tehai(new List <string> {
                "1m", "2m", "3m", "4m", "5m", "6m", "7m", "8m", "9m", "1s", "2s", "3s", "1m"
            });

            testTehai.Tsumo(new Pai("1m"));


            //chi
            var actor    = 0;
            var target   = 3;
            var furopai  = new Pai("1m");
            var consumed = new List <Pai> {
                new Pai("1m"), new Pai("1m"), new Pai("1m")
            };

            consumed.Sort();

            Assert.IsTrue(testTehai.tehai.Contains(new Pai("1m")));

            //実施
            testTehai.Daiminkan(actor, target, furopai, consumed);

            //フーロオブジェクトの構成が正しいか
            Assert.AreEqual(testTehai.furos[0].ftype, MJUtil.TartsuType.MINKANTSU);
            Assert.AreEqual(testTehai.furos[0].furopai, furopai);
            CollectionAssert.AreEqual(testTehai.furos[0].consumed, consumed);

            //晒した牌が手配に残っていないか
            Assert.IsFalse(testTehai.tehai.Contains(new Pai("1m")));
        }