コード例 #1
0
        public void Sequence_of_forced_draw_order()
        {
            Wall wall = new Wall();
            //Force a specific wall
            List <Tile> firstDraws = new List <Tile>();
            List <Tile> doras      = new List <Tile>();

            firstDraws.Add(new Tile(Tile.Suits.Pin, 2));
            firstDraws.Add(new Tile(Tile.Suits.Kaze, Tile.SHAA));
            firstDraws.Add(new Tile(Tile.Suits.Man, 9));
            firstDraws.Add(new Tile(Tile.Suits.Sangen, Tile.CHUN));
            wall.Build_ForceOrder(RuleSets.DefaultRules, firstDraws, doras);
            //Make sure the first 4 draws are as defined above
            Tile t = wall.Draw();

            Assert.IsTrue(t == new Tile(Tile.Suits.Pin, 2));
            t = wall.Draw();
            Assert.IsTrue(t == new Tile(Tile.Suits.Kaze, Tile.SHAA));
            t = wall.Draw();
            Assert.IsTrue(t == new Tile(Tile.Suits.Man, 9));
            t = wall.Draw();
            Assert.IsTrue(t == new Tile(Tile.Suits.Sangen, Tile.CHUN));
        }