コード例 #1
0
    private bool ContainsDestroyWholeRowColumnBonus(List <GameObject> matches)
    {
        if (matches.Count >= GameVariables.MinimumMatches)
        {
            foreach (var item in matches)
            {
                if (BonusTiles.ContainsDestroyWholeRowColumn(item.GetComponent <Tile>().Bonus))
                {
                    return(true);
                }
            }
        }

        return(false);
    }
コード例 #2
0
        /// <summary>
        /// Copies the data in the given player into this one.
        /// </summary>
        /// <param name="mp">The player data to copy.</param>
        public void CopyData(MahjongPlayer mp)
        {
            Score          = mp.Score;
            SeatWind       = mp.SeatWind;
            PrevailingWind = mp.PrevailingWind;

            while (BonusTiles.CardsInHand > 0)
            {
                BonusTiles.PlayCard(0);
            }

            Melds.Clear();

            foreach (MahjongMeld meld in mp.Melds)
            {
                Melds.Add(meld.Clone());
            }

            BonusTiles.DrawCards(mp.BonusTiles.Cards);
            return;
        }