Beispiel #1
0
        private void TestKongs(IList <Tile> handTiles, Tile discardTile, MeldSide side,
                               IList <OutTurnOperation> operations)
        {
            if (!gameSettings.AllowPongs)
            {
                return;
            }
            var kongs = MahjongLogic.GetKongs(handTiles, discardTile, side);

            if (kongs.Any())
            {
                foreach (var kong in kongs)
                {
                    operations.Add(new OutTurnOperation
                    {
                        Type           = OutTurnOperationType.Kong,
                        Tile           = discardTile,
                        Meld           = kong,
                        ForbiddenTiles = gameSettings.AllowDiscardSameAfterOpen
                                                        ? null
                                                        : kong.GetForbiddenTiles(discardTile)
                    });
                }
            }
        }