Exemplo n.º 1
0
        public void 手配暗槓テスト()
        {
            Tehai testTehai = new Tehai(new List <Pai> {
                new Pai("1m"), new Pai("1m"), new Pai("1m")
            });

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

            consumed.Sort();

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

            //実施
            testTehai.Ankan(actor, consumed);

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

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