Beispiel #1
0
 public override void Update(Board board, Wall wall)
 {
     for (var i = 0; i < 4; i++)
     {
         var seat = board.Seats[i];
         seat.SeatWind = TileType.FromSuitAndIndex(Suit.Jihai, i);
         seat.Score    = 25000;
     }
 }
Beispiel #2
0
        public void BlockingDaiminkan()
        {
            var parser = new ShorthandParser("12223m11222333z");
            var c      = new HandCalculator(parser);
            var m2     = TileType.FromSuitAndIndex(Suit.Manzu, 1);

            c.Daiminkan(m2);

            var actual = c.Shanten;

            Assert.Equal(1, actual);
        }
Beispiel #3
0
        public void ChiitoiDiscard()
        {
            var parser = new ShorthandParser("114477m114477p11s");
            var c      = new HandCalculator(parser);

            c.Discard(TileType.FromSuitAndIndex(Suit.Manzu, 0));
            c.Draw(TileType.FromSuitAndIndex(Suit.Jihai, 6));
            c.Discard(TileType.FromSuitAndIndex(Suit.Manzu, 3));

            var actual = c.Shanten;

            Assert.Equal(1, actual);
        }
Beispiel #4
0
        public void BlockingPon()
        {
            var parser = new ShorthandParser("1223m112223z123M");
            var c      = new HandCalculator(parser);
            var m2     = TileType.FromSuitAndIndex(Suit.Manzu, 1);

            c.Pon(m2);
            var shaa = TileType.FromSuitAndIndex(Suit.Jihai, 2);

            c.Discard(shaa);

            var actual = c.Shanten;

            Assert.Equal(1, actual);
        }
Beispiel #5
0
        public void BlockingShouminkan()
        {
            var parser = new ShorthandParser("1223m112223337z");
            var c      = new HandCalculator(parser);
            var m2     = TileType.FromSuitAndIndex(Suit.Manzu, 1);
            var z7     = TileType.FromSuitAndIndex(Suit.Jihai, 6);

            c.Pon(m2);
            c.Discard(z7);
            c.Draw(m2);
            c.Shouminkan(m2);

            var actual = c.Shanten;

            Assert.Equal(1, actual);
        }
Beispiel #6
0
 private Yaku Chun()
 {
     return(HasHonorTriplet(TileType.FromSuitAndIndex(Suit.Jihai, 6)) ? Yaku.Chun : Yaku.None);
 }
Beispiel #7
0
 private Yaku Hatsu()
 {
     return(HasHonorTriplet(TileType.FromSuitAndIndex(Suit.Jihai, 5)) ? Yaku.Hatsu : Yaku.None);
 }