Пример #1
0
 private void UpdateRoundStatus()
 {
     CurrentRoundStatus.CurrentPlayerIndex = CurrentPlayerIndex;
     // update hand tiles and open melds
     CurrentRoundStatus.RemoveFromRiver(DiscardPlayerIndex);
     CurrentRoundStatus.AddMeld(CurrentPlayerIndex, Operation.Meld);
     CurrentRoundStatus.RemoveTile(CurrentPlayerIndex, Operation.Meld);
     turnDoraAfterDiscard = Operation.Type == OutTurnOperationType.Kong;
 }
Пример #2
0
        private void UpdateRoundStatus()
        {
            var lastDraw = (Tile)CurrentRoundStatus.LastDraw;

            CurrentRoundStatus.LastDraw = null;
            CurrentRoundStatus.AddTile(CurrentPlayerIndex, lastDraw);
            if (Kong.IsAdded) // add kong
            {
                CurrentRoundStatus.AddKong(CurrentPlayerIndex, Kong);
                CurrentRoundStatus.RemoveTile(CurrentPlayerIndex, Kong.Extra);
            }
            else // self kong
            {
                CurrentRoundStatus.AddMeld(CurrentPlayerIndex, Kong);
                CurrentRoundStatus.RemoveTile(CurrentPlayerIndex, Kong);
            }
            CurrentRoundStatus.SortHandTiles();
            // turn dora if this is a self kong
            if (Kong.Side == MeldSide.Self)
            {
                MahjongSet.TurnDora();
            }
        }